[PATCH 1/4] setup.exe

Achim Gratz Stromeko@nexgo.de
Thu Feb 14 20:31:00 GMT 2013

Christopher Faylor writes:
> There is no need for setup.exe to add anything to a requires list due
> to autodep.

It needs to ensure that the package providing the script is installed,
which means installation, updating or doing nothing; depending on what
state the installation is in.  In terms of setup.ini this is "adding to
the requires list", in terms of setup.exe this list has been absorbed
into the package_db state at that point already.

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

I think so, too.

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

Yes, splitting the parsing over two lines should be slightly easier, but
probably not so much as to lose sleep over.

The bigger problem is that the std::regex library has not been
implemented for gcc yet, so we'd either have to use an extra library or
dispense with full regex parsing.  It seems not very likely that even
the 4.8 gcc series changes this, so suggestions on what to do instead
are welcome (using boost looks possible, but is said to be buggy).

The two current applications of autodep however could be implemented by
either matching path components or the extension which could be
implemented with the existing string functions and perhaps using a
slightly different syntax in setup.ini:

autoext: dll so oct
autopath: /usr/share/info /usr/info

I don't know if you had other applications for autodep in mind where
these two wouldn't be sufficient and a real regex parser would be
needed, though.

+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf microQ V2.22R2:

More information about the Cygwin-apps mailing list