With this modest change, rpm is now able to trigger on 1-of-N
directories
explicitly mentioned.
E.g.
%triggerpostun b -- /tmp/test-triggers-+(a|b)/
echo "--- triggerpostun(b/a) arg $1 $2 ..."
triggers on either of
/tmp/test-triggers-a
/tmp/test-triggers-b
Essentially the equivalent of the pattern
/tmp/test-triggers-[ab]
(which also works) without the messiness of character classes.
Note the trailing /, which implies RPMTAG_DIRNAMES is used.
There's still a bit of work to apply fnmatch to full file paths
symmetrically.
And the rpmbuild parser (and other locations) likely need to be
tricked up to recognize
globs like
+(/bing|/bang|/boom)/foo
as file path expressions.
73 de Jeff
On Oct 1, 2008, at 1:19 PM, Jeff Johnson wrote:
> RPM Package Manager, CVS Repository
> http://rpm5.org/cvs/
>
> ______________________________________________________________________
> ______
>
> Server: rpm5.org Name: Jeff Johnson
> Root: /v/rpm/cvs Email: jbj@rpm5.org
> Module: rpm Date: 01-Oct-2008
> 19:19:50
> Branch: HEAD Handle: 2008100117194900
>
> Modified files:
> rpm CHANGES
> rpm/rpmio mire.c
>
> Log:
> - jbj: add FNM_EXTMATCH to default flags w RPMMIRE_GLOB.
>
> Summary:
> Revision Changes Path
> 1.2580 +1 -0 rpm/CHANGES
> 1.45 +1 -1 rpm/rpmio/mire.c
>
> ______________________________________________________________________
> ______
>
> patch -p0 <<'@@ .'
> Index: rpm/CHANGES
>
> ======================================================================
> ======
> $ cvs diff -u -r1.2579 -r1.2580 CHANGES
> --- rpm/CHANGES 1 Oct 2008 15:18:43 -0000 1.2579
> +++ rpm/CHANGES 1 Oct 2008 17:19:49 -0000 1.2580
> @@ -1,5 +1,6 @@
>
> 5.1.0 -> 5.2a0:
> + - jbj: add FNM_EXTMATCH to default flags w RPMMIRE_GLOB.
> - jbj: update {nl,id,pl}.po (Translation Project).
> - jbj: rpmio: permit adler32/crc32/crc64 in spite of --
> without-zlib.
> - jbj: rpmio: eliminate HAVE_ZLIB_H tests, use WITH_ZLIB
> tests instead.
> @@ .
> patch -p0 <<'@@ .'
> Index: rpm/rpmio/mire.c
>
> ======================================================================
> ======
> $ cvs diff -u -r1.44 -r1.45 mire.c
> --- rpm/rpmio/mire.c 31 Jul 2008 16:58:58 -0000 1.44
> +++ rpm/rpmio/mire.c 1 Oct 2008 17:19:49 -0000 1.45
> @@ -26,7 +26,7 @@
> int _mireSTRINGoptions = 0;
>
> /*@unchecked@*/
> -int _mireGLOBoptions = FNM_PATHNAME | FNM_PERIOD;
> +int _mireGLOBoptions = FNM_EXTMATCH | FNM_PATHNAME | FNM_PERIOD;
>
> /*@unchecked@*/
> int _mireREGEXoptions = REG_EXTENDED | REG_NEWLINE;
> @@ .
> ______________________________________________________________________
> RPM Package Manager http://rpm5.org
> CVS Sources Repository rpm-cvs@rpm5.org
Received on Wed Oct 1 19:28:41 2008