Re: Re: yum search behaviour change from 3.0.x to 3.2.x

MHR <[email protected]>
Newsgroups gmane.linux.rpm.yum
Message-ID <[email protected]>
On Thu, May 29, 2008 at 2:54 PM, James Antill <[email protected]> wrote:
>
>  That's fine, if that's what you want, but you'll probably find that the
> following is faster (esp. on newer versions of yum):
>
> import yum
> import sys
>
> my = yum.YumBase()
> my.conf.cache = 1
>
> searchterms = sys.argv[1:]
> searchlist = ['name']
>
> print '::searching'
> res = my.searchGenerator(searchlist, searchterms)
>
> for (pkg,values) in res:
>    ver = pkg.printVer()
>    na = '%s.%s' % (pkg.name, pkg.arch)
>    # Print like list
>    print "%-40.40s %-22.22s %-16.16s" % (na, ver, pkg.repoid)
>

This does not appear to be a bash function/script/alias/anything - is that perl?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.