From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21296 invoked by alias); 14 Feb 2013 20:31:19 -0000 Received: (qmail 21280 invoked by uid 22791); 14 Feb 2013 20:31:16 -0000 X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-in-03.arcor-online.net (HELO mail-in-03.arcor-online.net) (151.189.21.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Feb 2013 20:31:09 +0000 Received: from mail-in-17-z2.arcor-online.net (mail-in-17-z2.arcor-online.net [151.189.8.34]) by mx.arcor.de (Postfix) with ESMTP id 3BB65D82C1 for ; Thu, 14 Feb 2013 21:31:07 +0100 (CET) Received: from mail-in-11.arcor-online.net (mail-in-11.arcor-online.net [151.189.21.51]) by mail-in-17-z2.arcor-online.net (Postfix) with ESMTP id 38F1A10C053 for ; Thu, 14 Feb 2013 21:31:07 +0100 (CET) Received: from Rainer.invalid (pD9EB55D8.dip.t-dialin.net [217.235.85.216]) (Authenticated sender: stromeko@arcor.de) by mail-in-11.arcor-online.net (Postfix) with ESMTPSA id D1B9935A5D6 for ; Thu, 14 Feb 2013 21:31:06 +0100 (CET) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-11.arcor-online.net D1B9935A5D6 From: Achim Gratz To: cygwin-apps@cygwin.com Subject: Re: [PATCH 1/4] setup.exe References: <87wqva4d7e.fsf@Rainer.invalid> <87r4l8or3d.fsf@Rainer.invalid> <87ip6koqwr.fsf_-_@Rainer.invalid> <51153155.3030404@dronecode.org.uk> <87txpm7atu.fsf@Rainer.invalid> <20130210192320.GA6562@ednor.casa.cgf.cx> <87obfo58ta.fsf@Rainer.invalid> <20130213193003.GA5287@ednor.casa.cgf.cx> <8738wz6h5p.fsf@Rainer.invalid> <20130213220849.GA3922@ednor.casa.cgf.cx> Date: Thu, 14 Feb 2013 20:31:00 -0000 In-Reply-To: <20130213220849.GA3922@ednor.casa.cgf.cx> (Christopher Faylor's message of "Wed, 13 Feb 2013 17:08:49 -0500") Message-ID: <87hale1vuk.fsf@Rainer.invalid> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com X-SW-Source: 2013-02/txt/msg00146.txt.bz2 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. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptation for Waldorf microQ V2.22R2: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada