On Wed, 2007-01-17 at 09:49 -0800, David Lutterkort wrote:
> 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.

in the mock x86_64 config we use it to exclude ALL the packages
named .i386 or .i686 EXCEPT for glibc and a few others. It's hurky but
required to get stuff to build.

> > 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*'.

rock.


> 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.

ah, a bug, how nice. Thank you.



I don't have your original email anymore - how much of a speed
improvement were you seeing with your patch?

-sv


_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel

Reply via email to