This is the mail archive of the cygwin 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: Is setup.exe _supposed_ to delete the cygwin dll before attempting to run shell scripts?

Igor Pechtchanski wrote:

> It'll work for simple programs, but not for packages where preremove
> scripts erase files that are needed to run some programs from that
> package.  One example (not necessarily a perfect one) that comes to mind
> right away is the base-files package, where the preremove script will
> currently erase /etc/profile (so any script executing "bash -l" will not
> get the expected results).  I'm sure there are better examples...
> FWIW, this is probably somewhat similar to the issue of circular
> dependencies of postinstall scripts -- there is no good general solution
> if we assume monolithic scripts.

Wouldn't the "proper" way to do this be to build the dependency tree
then remove packages in depth-first order, running each preremove before
removing each package list?


Dependency tree:

 / \
B   C

So lets say you want to remove and then upgrade new versions of A, B, C,
and D.

You first get the depth-first order: D, C, B, A.

Then you run: preremove(D), remove-files(D), preremove(C),
remove-files(C), preremove(B), remove-files(B), preremove(A),

To install you do the same thing, except you'd do breadth-first and
you'd do postinstall(X) after each install-files(X).  (I know this is
not the current method, where all postinstalls are run in a batch at the


Unsubscribe info:
Problem reports:

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