[PATCH 1/4] setup.exe

Christopher Faylor cgf-use-the-mailinglist-please@cygwin.com
Wed Feb 13 22:08:00 GMT 2013

On Wed, Feb 13, 2013 at 10:24:50PM +0100, Achim Gratz wrote:
>Christopher Faylor writes:
>> The autodep/autorun wasn't an either/or.  We need the autodep and, while
>As I understand (and this might be wrong as I don't know what upset is
>doing), autodep adds that package to the requires of another package if
>the dependency regex matches for any files installed by that other
>package, unless the regex in noautodep also matches.  Additionally, the
>version of the autodep'ed package is incremented if incver_ifdep is set
>to "yes", which has the effect that the package will be re-installed
>(setup.exe sees it has a newer version) and hence the postinstall script
>will run again.

There is no reason to worry about how upset manages things currently.
The point of adding this functionality is to not have upset do anything.

>When doing this from within setup.exe, without manipulating the version
>in setup.ini, there are again two things to take care of: the autodep
>part, that is adding the autodep'ed package to the requires list so that
>the package will be installed; then the "consider this package updated"
>part that will lead to re-installation.

There is no need for setup.exe to add anything to a requires list due
to autodep.

>However, the sole purpose of making the package appear updated is (today
>at least) to run the postinstall script again.  My suggestion was that
>the part of running a script whenever another package installs certain
>file patterns should be a separate (additional) functionality.  You
>couldn't do this with upset, but you can when it moves into setup.exe.
>I was not suggesting to drop the autodep functionality, although
>currently it would have no real use (cygwin doesn't need it since it is
>already special cased in setup.exe via the "base" category).

We have at least two specific needs for for the ability to run a script
when certain files are installed: .info files and dlls.

Just to reiterate what I'm asking for (which I think is converging on
what you are saying):

Whenever setup sees a file which matches pattern X being installed, flag
that we have to run program Y before running postinstall scripts.  Then
when everything has been installed run all program Y's.  It might be
nice if the programs received filename arguments indicating all of the
recently installed files but that is not necessary for the current
needs.  And, it might be nice, as you mention, to be able to run the
script after the postinstalls.

My proposal is that the rebase package will have a setup.hint which
contains (at the simplest)

autodep: .*/[^/]*\.(?:dll|so|oct)$
autorun: /usr/bin/rebaseall

I wanted two lines for the ease in parsing.

However, I guess that could also be:

autorun: /usr/bin/rebaseall .*/[^/]*\.(?:dll|so|oct)$

Maybe that's what you're saying.  I was thinking that two lines would
make parsing easier but I suppose that you could also just assume that
the first "program to run" pattern doesn't contain any spaces so the
parsing would be the equivalent of ([\S+])\s*(.*)$ .  An empty regex
string could be allowed to match everything.


More information about the Cygwin-apps mailing list