RPM Community Forums

Mailing List Message of <rpm-devel>

Re: new DISTEPOCH tag and cleaning of RELEASE tag polution

From: Ralf S. Engelschall <rse+rpm-devel@rpm5.org>
Date: Sun 21 Dec 2008 - 14:45:25 CET
Message-ID: <20081221134525.GA41902@engelschall.com>
On Sun, Dec 21, 2008, Jeff Johnson wrote:

> [...]
> The OpenPKG patch attempts to be more general than
> the suffix wildcard example I gave, and so has
> some peculierness associated if embedded, not
> appended, within a V or R string.
>
> The following character, not the following character class, is used to find
> the next matchpoint to continue with:
>
> #if defined(RPM_VENDOR_OPENPKG) /* support-wildcards-in-EVR-comparison */
>         if (a[0] == '*') {
>             ae = a + 1;
>             if ((be = strchr(b, a[1])) == NULL)
>                 be = b;
>         }
>         else if (b[0] == '*') {
>             be = b + 1;
>             if ((ae = strchr(a, b[1])) == NULL)
>                 ae = a;
>         }
>         else
> #endif
>
> That is easily fixed with a loop instead of using strchr, moving
> the other string match point over characters until a match
> in same character class can be attempted.
>
> There's also the issue of rpmdb EVR lookups that won't be quite
> right when a '*' is used is used in the retrieval key, and there's a slight
> chance of scwewiness with escaped RE chars in one or two
> places off the top of my head.
>
> But trigger EVR's already can support patterns and lookups, the only
> additional complexity (and unsupported with trigger pattern
> matching as well, so needs fixing) is that character classes
> willl need the '-' character within, say "[a-z]" or "[0-9]" character
> classes special cased, not particularly hard to parse.

Jeff, please feel free to adjust this stuff to better fit your needs.
For OpenPKG I actually just need the special case where a whole "V" is
matched by a single "*", i.e., "foo >= *-1.2.3". This currently is the
only functionality I really care about. So, as long as this is still
possible, please feel free to adjust the whole stuff as much as possible
and to the maximum extend it is useful for RPM in general. No problem
if you make it completely different or break it, except the "foo >=
*-1.2.3" case for which this was originally invented...

                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com
Received on Sun Dec 21 14:50:08 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.