This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Heads-up: postinstall scripts and PATH (Attn all package maintainers)


On Tue, 24 Feb 2004, Harold L Hunt II wrote:

> Igor Pechtchanski wrote:
> > XFree86-f*.sh: umount, cygpath, mount
> >       Note: the above script should also check that the directory is
> >       already mounted in the correct mode instead of unmounting and
> >       remounting it all the time.
>
> The reason we force an unmount is that the mount point may, in fact, by
> pointing to a non-existant path.

Touché.  Make that "...already mounted off the correct path and in the
correct mode...".

> That means that setup.exe will extract our package files to /dev/null on
> an attempt at a first install with an invalid font mount point.
> However, most users will then attempt a second install; without the
> forced unmount/remount, the same problem would recur.  The forced
> unmount/remount causes the second and subsequent installation attempts
> to succeed.

OTOH, it's probably not that expensive to do anyway, so it might as well
stay that way (especially since I was the one who originally suggested it)
;-)

> I would love to solve this problem properly but "pre-install" scripts
> would be a real challenge for setup.exe, unless there was a concise set
> of rules about what packages could and could not have pre-install
> scripts, lest we end up with chicken before egg problems for some packages.

Yes.  Setup does support "preremove" scripts, though, and they could do
the umount...  It might be cheaper to do it the way it's done now, but if
done in the preremove, at least the installation should succeed.

> > XFree86-lib.sh: mkdir, test?, tar, rm, ln
> > XFree86-prog.sh: touch, ln
> > XFree86-xserv.sh: ln
> > fontconfig.sh: dirname, basename, diff, cp, mkdir
> >       Note: this one also uses bash syntax.  Moreover, it requires things
> >       like "diff" and "dirname"/"basename" to run, but neither "diffutils"
> >       nor "sh-utils" are in the "requires" clause of "fontconfig".
> > freetype2.sh: mkdir, ln
>
> I agree that I should probably hand-craft the PATH for all of the above
> scripts (including the XFree86-f*.sh scripts).

Yeah, you're right, actually prepending /bin to the path might be a better
solution for large scripts.  But what I don't understand is why it didn't
work when done from setup...  Could it be an environment export issue of
some sort?

> > xfig.sh: mkdir, tar, rm, ln
> >       Note: "tar" should be "require"d.
>
> Ditto.  Interesting not about tar not being a required package.  I never
> realized that that script used tar.  In fact, I don't remember writing
> it, so somebody else must have written it... clever script :)
>
> Harold

Yep, that's the best (easiest) way to copy a directory structure with
symbolic links, etc, intact.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]