[yum-cvs] yum/__init__.py

Jeremy Katz katzj at linux.duke.edu
Wed Dec 5 19:53:06 UTC 2007


 yum/__init__.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c65bdd8ffd3bfa1e6d29e904dda7dcd87538df6b
Author: Jeremy Katz <katzj at redhat.com>
Date:   Wed Dec 5 14:52:55 2007 -0500

    If the sack has no packages, we want to go back through and try to set it up
    
    If a caller ends up grabbing a package sack and then later adding repos,
    we need to ensure that the sack setup can still happen later.  If there
    aren't any packages, then self._pkgSack is an empty iterator which evaluates
    to False

diff --git a/yum/__init__.py b/yum/__init__.py
index f99adde..92c8d26 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -362,7 +362,7 @@ class YumBase(depsolve.Depsolve):
         """populates the package sacks for information from our repositories,
            takes optional archlist for archs to include"""
 
-        if self._pkgSack is not None and thisrepo is None:
+        if self._pkgSack and thisrepo is None:
             self.verbose_logger.log(logginglevels.DEBUG_4,
                 'skipping reposetup, pkgsack exists')
             return self._pkgSack



More information about the Yum-cvs-commits mailing list