RPM Community Forums

Mailing List Message of <rpm-devel>

Re: Adding dependency alternation using glob expressions?

From: Jeff Johnson <n3npq@mac.com>
Date: Thu 25 Sep 2008 - 18:03:38 CEST
Message-id: <19755FFD-8FC1-4075-B877-4FBDF16C2BB3@mac.com>

On Sep 25, 2008, at 11:24 AM, Jeff Johnson wrote:
>
>
> (aside Hmmm, the KSH glob pattern extensions, including "@(A|B)"  
> alternation, seems
> to have vanished from glibc, perhaps to achieve POSIX  
> compatibility. I know the alternation
> was implemented in glibc at some point in time because rpmcache  
> used the @(A|B) syntax.
>
> The pattern syntax is still documented in ksh(1).
>
> I think I already discovered this fact 9 months ago, but have  
> forgot, sigh.
>

Ah, the KSH extensions to fnmatch are still in glibc. From posix/ 
fnmatch_loop.c in glibc:
...
         case L('+'):
         case L('@'):
         case L('!'):
           if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(')
             {
...
I'd just missed/forgotten FNM_EXTMATCH.

Time to upgrade rpmio/{glob,fnmatch}.c with latest glibc routines,  
todo++.

73 de Jeff
Received on Thu Sep 25 18:04:23 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.