[Yum-devel] [PATCH] Do not add pkgtags if not available.

Zdenek Pavlas zpavlas at redhat.com
Tue Dec 6 15:49:11 UTC 2011


> ...this is what I can't trigger.

Ok, I see.  This is the reproducer that works for me:

1) install yum.git/master with the following patch:

--- a/yum/misc.py
+++ b/yum/misc.py
@@ -1092,7 +1092,7 @@ def get_uuid(savepath):
         
         return myid
         
-def decompress(filename, dest=None, fn_only=False, check_timestamps=False):
+def decompress(filename, dest=None, fn_only=False, check_timestamps=True):
     """take a filename and decompress it into the same relative location.
        if the file is not compressed just return the file"""
     
2) sudo yum clean all
3) sudo yum repolist
4) yum search -C xxx

  ..
  File "./yum/__init__.py", line 989, in <lambda>
    pkgtags = property(fget=lambda self: self._getTags(),
  File "./yum/__init__.py", line 933, in _getTags
    self._tags.add(repo.id, tag_sqlite)
  File "./yum/pkgtag_db.py", line 110, in add
    dbobj = PackageTagDB(repoid, sqlite_file)
  File "./yum/pkgtag_db.py", line 54, in __init__
    self._conn = sqlite.connect(sqlite_file)
sqlite3.OperationalError: unable to open database file

repo_gen_decompress(cached=True) calls decompress(name_only=True).
Opening the returned file then fails if it's not decompressed yet.


More information about the Yum-devel mailing list