From 49edad7b7acb6d256a7c8a43ed5a419ff0e305e5 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Thu, 6 Jan 2011 01:46:46 +0100 Subject: [PATCH] [sulfur.packages] catch caching issues in time inside _pkg_get_masked --- sulfur/src/sulfur/packages.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sulfur/src/sulfur/packages.py b/sulfur/src/sulfur/packages.py index 18bd5805e..859c698af 100644 --- a/sulfur/src/sulfur/packages.py +++ b/sulfur/src/sulfur/packages.py @@ -989,6 +989,16 @@ class EntropyPackages: return None if yp.action is None: + pkg_id, pkg_repo = match + # make sure that package is available before calling + # get_masked_package_action, otherwise + # Entropy.get_package_action will raise TypeError at + # retrieveKeySlot + pkg_db = self.Entropy.open_repository(pkg_repo) + if not pkg_db.isPackageIdAvailable(pkg_id): + const_debug_write(__name__, + "_pkg_get_masked: wtf, pkg not avail: %s" % (yp,)) + return None yp.action = gmp_action(match) if yp.action == 'rr': # setup reinstallables idpackage = gi_match(match)