[Yum-devel] Simple speedup of 'yum install'
David Lutterkort
dlutter at redhat.com
Wed Jan 17 17:49:40 UTC 2007
On Tue, 2007-01-16 at 23:46 -0500, seth vidal wrote:
> As cracktastic as it may seem - our current globbing mechanism covers
> things like
>
> [abcdefghijklmno]pkgname.i386
Out of curiosity, how exactly is that used ? I have a hard time coming
up with an example where I would want to glob by character set.
> I don't think the globtolike function you wrote will work in that. We
> use the [] mechanism in mock and for funky excludes.
globtolike goes to show that hours of hacking can easily save you 5
minutes of reading docs. Turns out that sqlite has a (non-ANSI) operator
'glob' which does exactly what is needed here. Updated patch attached; I
can now successfully run 'yum install [xyz]p?f*'.
BTW, packages.parsePackages checks if the pattern contains '[\*,\[,\],
\{,\},\?]' - I think the '{}' shouldn't be in there, they are not
special in globs, and fnmatch.translate just puts them literally into
the regexp.
David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parsePackages3.patch
Type: text/x-patch
Size: 6094 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20070117/5559da0a/attachment.bin
More information about the Yum-devel
mailing list