[Yum] repoquery --whatprovides /usr/lib/python2.4 in rawhide

Panu Matilainen pmatilai at laiskiainen.org
Wed Nov 8 19:55:40 UTC 2006

On Tue, 2006-11-07 at 16:11 -0800, David Lutterkort wrote:
> When I run
>         repoquery --whatprovides /usr/lib/python2.4
> against Fedora rawhide, I get
>         kdebindings-0:3.5.5-0.1.fc6.i386
>         mailman-3:2.1.9-2.i386
>         python-0:2.4.4-1.fc7.i386
> I understand python (expected) and kdebindings (packaging mistake), but
> can't find any reason why mailman would provide /usr/lib/python2.4. The
> closest I have found is that it owns
> '/usr/lib/mailman/pythonlib/lib/python2.4' .. is this a bug in
> repoquery ?

It's a bug alright, but actually in yum (3.0) itself, repoquery simply
calls yum methods here. sqlitesack.searchPrco() uses SQL "LIKE" in the
search instead of exact matching (unless the name contains % characters)
which seems to be the problem here.

To verify, the one-liner below disables using LIKE under any
circumstances and then only python and kdebindings (which has a
packaging bug) are left. Makes me wonder why is yum doing non-exact
matching in file provides? Doesn't seem like a very good idea to me :)

--- yum/sqlitesack.py.exact     2006-11-08 21:35:20.000000000 +0200
+++ yum/sqlitesack.py   2006-11-08 21:48:38.000000000 +0200
@@ -362,7 +362,7 @@
         for (rep,cache) in self.filelistsdb.items():
             cur = cache.cursor()
             (dirname,filename) = os.path.split(name)
-            if name.find('%') == -1: # no %'s in the thing safe to LIKE
+            if name.find('%') == None: # no %'s in the thing safe to LIKE
                 cur.execute("select packages.pkgId as pkgId,\
                     filelist.dirname as dirname,\
                     filelist.filetypes as filetypes,\

	- Panu -

More information about the Yum mailing list