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: Setup uninstall order


On Mon, 29 Sep 2003, Chris January wrote:

> AFAICT uninstall of existing packages in Setup is done in an arbitrary (or
> possible alphabetical) order. Uninstall needs to be done in the reverse
> order of package dependancies (if that makes sense) if it is to succeed.
> i.e. if you build a dependancy graph/tree of all the packages, then the
> leaves should be uninstalled, then their parents and so on.
> The problem is that, for example, if the cygwin package is uninstalled, and
> then another package that has an uninstall script, the script can't run
> because the cygwin DLL has already been uninstalled.
>
> Chris

Chris,

This has been proposed more than once, IIRC.  Unfortunately, this would
involve radically changing the uninstall logic (right now the package
object is asked to uninstall itself, and does all the necessary things).
Further, many things aren't even defined during uninstall, e.g., suppose
you have a circular dependence -- which package do you uninstall first?
You can't choose an arbitrary order, of course.

There are severe limitations on what a preremove script can do (and those
should be documented, but aren't).  There are some kludges that will get a
semblance of ordering the uninstalls without actually doing so (e.g., run
all the preremove scripts in one big batch in reverse order of
dependences), but they might create more problems than they solve.  If we
do it at all, we should probably do it right.  Comments?
	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]