[yum-commits] Branch 'yum-3_2_X' - yum/__init__.py yum/rpmsack.py
James Antill
james at osuosl.org
Mon Jan 4 15:37:46 UTC 2010
yum/__init__.py | 4 ++++
yum/rpmsack.py | 7 +++++++
2 files changed, 11 insertions(+)
New commits:
commit 3f4057b21838abef99fd7e994dbd8a69efe4e98f
Author: James Antill <james at and.org>
Date: Sun Jan 3 11:37:26 2010 -0500
Add transactionReset() to the rpmdb API. Hopefully fixes BZ 550246
This lets us clear out the data for the transaction that is about to
happen ... Eg. skip-broken, or maybe transaction splitting in the
future.
I haven't seen the failure in 550246, but I think this will fix it.
diff --git a/yum/__init__.py b/yum/__init__.py
index 74c10f2..b8244ca 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -867,6 +867,10 @@ class YumBase(depsolve.Depsolve):
looping = 0
while (len(self.po_with_problems) > 0 and rescode == 1):
count += 1
+ # Remove all the rpmdb cache data, this is somewhat heavy handed
+ # but easier than removing it ... and skip-broken shouldn't care
+ # too much about speed.
+ self.rpmdb.transactionReset()
self.verbose_logger.debug(_("Skip-broken round %i"), count)
self._printTransaction()
depTree = self._buildDepTree()
diff --git a/yum/rpmsack.py b/yum/rpmsack.py
index 23ebd3e..229adaa 100644
--- a/yum/rpmsack.py
+++ b/yum/rpmsack.py
@@ -486,6 +486,13 @@ class RPMDBPackageSack(PackageSackBase):
self._trans_cache_store = {}
+ def transactionReset(self):
+ """ We are going to reset the transaction, because the data we've added
+ already might now be invalid (Eg. skip-broken, or splitting a
+ transaction). """
+
+ self._trans_cache_store = {}
+
def returnGPGPubkeyPackages(self):
""" Return packages of the gpg-pubkeys ... hacky. """
ts = self.readOnlyTS()
More information about the Yum-commits
mailing list