Can Not Install Font Packages

Igor Pechtchanski pechtcha@cs.nyu.edu
Mon Oct 20 20:04:00 GMT 2003


Harold,

There are mounts, and there are mounts.  If the user creates her own mount
for the fonts directory, it's her responsibility to remove the mount after
uninstalling.  However, the only purpose of this particular mount created
by the postinstall package is to force binmode for the fonts directory.
I don't see anything wrong with removing this mount before the files
themselves are removed (especially since it's going to be re-created later
by the postinstall script).

You're right that in this particular case the preremove scripts would not
have been run, so there's no point in targeting it.  I believe in cleaning
up after postinstall scripts, though, and preremove scripts are the right
place to do it.  FWIW, my quick-and-dirty idea was basically to have each
font package postinstall script create a uniquely named file in a known
location, and each preremove script remove its corresponding file and then
check whether any other files exist, and if not, umount.

I think for setup to detect when a mount is stale would be a good idea
anyway.  Currently, AFAIK, setup doesn't have a notion of "failing to
install a package" with subsequent reinstall, but if it ever does, this
would be the right way to handle the situation.
	Igor

On Mon, 20 Oct 2003, Harold L Hunt II wrote:

> Igor,
>
> The problem has been happening less often, but I am all for fixing it
> permanently.
>
> It sounds to me like a pre-remove script would function at the wrong
> time, if my assumption that the pre-remove script is run before the
> files are removed is correct.  Sounds to me like we would need a
> post-remove script that had unmounted the directory if it was still mounted.
>
> Also, neither a pre-remove nor a post-remove script would work in this
> case.  The problem here is that his alternate hard drive crashed, thus
> no remove scripts were ever run.  Upon reinstalling Cygwin he had a
> problem because the package is unpacked to its destination directory
> before any scripts are run.  Setup was trying to write files to a mount
> point that didn't exist.
>
> Maybe this needs a more generic fix in setup.exe to detect when it is
> attempting to write files to a mount point that doesn't have an actual
> location on disk.  Perhaps in that case it could either fail
> (acceptable) or present a dialog asking if the mount should be removed
> and the unpacking tried again.
>
> What do you think?
> Harold
>
>
> Igor Pechtchanski wrote:
>
> > Harold,
> >
> > Do you think the pre-remove scripts for the fonts packages should attempt
> > to unmount the directory?  It's very hard to get this right, though,
> > because this has to be done by the *last* package being uninstalled.  I
> > can think of one quick and dirty solution, but maybe we should do some
> > brainstorming first and try to do it right.  I'm willing to help out with
> > coding the final solution, whatever it is.
> >       Igor
> >
> > On Mon, 20 Oct 2003, Harold L Hunt II wrote:
> >
> >
> >>Joshua,
> >>
> >>Please run in a bash shell:
> >>
> >>umount /usr/X11R6/lib/X11/fonts
> >>
> >>You may need to twiddle the parameters to umount a little, with the
> >>point being that you need to remove the mount for the fonts directory as
> >>it probably points to a non-existant directory or drive.
> >>
> >>Harold
> >>
> >>Joshua Rubin wrote:
> >>
> >>
> >>>I am finding out more about why this is not installing right...
> >>>
> >>>In a bash shell (not using X), I CAN NOT create the fonts folder.
> >>>
> >>>This is the output.
> >>>
> >>>$ mkdir fonts
> >>>mkdir: cannot create directory `fonts': No such file or directory
> >>>
> >>>It seems that something from my old install is causing this.  Does
> >>>anyone have a clue?!?
> >>>
> >>>Joshua

-- 
				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



More information about the Cygwin-xfree mailing list