[csw-maintainers] Order of matching of PKGFILES_CSWfoo patterns
Dagobert Michelsen
dam at opencsw.org
Tue Jul 21 15:19:57 CEST 2009
Hi Maciej,
Am 21.07.2009 um 14:52 schrieb Maciej (Matchek) Blizinski:
> Suppose we have this build:
>
> PACKAGES = CSWfoo CSWbar
> PKGFILES_CSWfoo = /opt/csw/bin/foo
> PKGFILES_CSWbar = /opt/csw/bin/.*
>
> There are two files:
>
> /opt/csw/bin/foo
> /opt/csw/bin/bar
>
> Is the outcome of such build specified or unspecified? If specified,
> what is the order of resolution? First wins, last wins? What's the
> order?
In parallel :-) The path must match include and not exclude.
The decision is shortcut. All pathes included in a package are
excluded from all other packages. That means IIRC the package
CSWfoo would contain 'foo' and CSWbar would contain 'foo' and
'bar'. The mechanism was written to simplify saying explicitly
what you want in what package and exclude stuff from other
packages. It was not meant for funky include-but-not-excluded-
if-unless-else :-) These are however Perl-regexps, so it is
allowed to write all advanced REs from Perl like lookahead
or negative matches. Something like this should do what you
want:
> PKGFILES_CSWfoo = /opt/csw/bin/foo
> PKGFILES_CSWbar = /opt/csw/bin/(?!foo)
This should be described here:
<https://sourceforge.net/apps/trac/gar/wiki/Prototypes>
If there is something unclear please let me know.
See perlre(1) or "Mastering Regular Expressions" for further
reading (or post of course :-)
Here is the interesting expression:
http://sourceforge.net/apps/trac/gar/browser/csw/mgar/gar/v2/gar.pkg.mk#L322
>
Best regards
-- Dago
More information about the maintainers
mailing list