[yum-commits] Branch 'yum-3_2_X' - yum/rpmsack.py

James Antill james at osuosl.org
Wed Jan 27 18:48:04 UTC 2010


 yum/rpmsack.py |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 6f7caa13baad402500492e1df7b9f53cd0144ea0
Author: James Antill <james at and.org>
Date:   Wed Jan 27 11:05:23 2010 -0500

     Don't cache fileRequires when the user has butchered their rpmdb
    
     Basically if something in the rpmdb has missing file requires, then
    don't bother caching the file requires data ... we could actually save
    the Unresolved data too, but I figured it wouldn't be common and we'd
    just tell people to not do that (hint, tim ;).
     We did this at the entry point which we'd never hit, but missed the
    one we can "easily" hit with rpm --nodeps ... oops.

diff --git a/yum/rpmsack.py b/yum/rpmsack.py
index 6840a57..b45f315 100644
--- a/yum/rpmsack.py
+++ b/yum/rpmsack.py
@@ -659,6 +659,11 @@ class RPMDBPackageSack(PackageSackBase):
          installedUnresolvedFileRequires,
          installedFileProvides) = data
 
+        #  Have to do this here, as well as in transactionCacheFileRequires,
+        # because fileRequiresData() calls us directly.
+        if installedUnresolvedFileRequires:
+            return
+
         fo = open(self._cachedir + '/file-requires.tmp', 'w')
         fo.write("%s\n" % rpmdbversion)
 


More information about the Yum-commits mailing list