On Jun 10, 2008, at 11:29 PM, Jeff Johnson wrote:
>
> The underlying issue is what type of match should be attached
> to RPMMIRE_DEFAULT. I can tell from the constructed "^foo$"
> pattern that a RE is being attempted. However, at some point
> I changed my mind and decided that an RE was overkill when
> only a strcmp(3) is needed. However the odd case of querying
> non-existent uninstalled packages never got found until now.
>
> The other, better, way to fix is what I will likely check-in tomorrow,
> mapping RPMMIRE_DEFAULT onto a strcmp as I intended,
> and changing the code in rpmdb/rpmdb.c to not bother building
> the "^foo$" RE.
>
Actually, I'll likely leave RPMMIRE_DEFAULT as is (in which
case the patch I gave you is the "fix").
There's a still deeper issue that I've always worried about,
likely foolishly.
Most lusers (including me) often confuse globs with regexes.
E.g. I frequently don't bother escaping '.' when using grep,
in most cases it doesn't matter and I 'm both a bad typist
and too lazy to be pedantically correct.
So RPMMIRE_DEFAULT attempts to convert globs into
an anchored simplified RE, escaping periods as needed,
and adding a '.' before a '*' splat.
Whether that decision to convert globs to RE's was wise (or not),
RPMMIRE_DEFAULT is the behavior implemented in rpm for
many years, and so I'll continue with the status quo ante.
Now if I can just get gdb to stop misbehaving, sigh ...
73 de Jeff
Received on Wed Jun 11 05:58:40 2008