[yum-commits] Branch 'yum-3_2_X' - yum/__init__.py
Tim Lauridsen
timlau at osuosl.org
Thu Dec 11 10:34:01 UTC 2008
yum/__init__.py | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
New commits:
commit ed464f9770af8118ba6f65a4ff4f060374bfc202
Author: tla at dk.ibm.com <tla at tlaws.local>
Date: Thu Dec 11 11:33:47 2008 +0100
Stop skip-broken from looping in weird cases
diff --git a/yum/__init__.py b/yum/__init__.py
index ff7b02a..4a3e573 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -701,7 +701,7 @@ class YumBase(depsolve.Depsolve):
skipped_po = set()
removed_from_sack = set()
orig_restring = restring # Keep the old error messages
- hard_restart = False
+ looping = 0
while (len(self.po_with_problems) > 0 and rescode == 1):
count += 1
self.verbose_logger.debug(_("Skip-broken round %i"), count)
@@ -726,7 +726,8 @@ class YumBase(depsolve.Depsolve):
# the first time we get here we reset the resolved members of
# tsInfo and takes a new run all members in the current transaction
if not toRemove:
- if hard_restart:
+ looping += 1
+ if looping > 2:
break # Bail out
else:
self.verbose_logger.debug('SKIPBROKEN: resetting already resovled packages (no packages to skip)' )
@@ -738,12 +739,14 @@ class YumBase(depsolve.Depsolve):
# the first time we get here we reset the resolved members of
# tsInfo and takes a new run all members in the current transaction
if startTs-endTs == set():
- if hard_restart:
+ looping += 1
+ if looping > 2:
break # Bail out
else:
self.verbose_logger.debug('SKIPBROKEN: resetting already resovled packages (transaction not changed)' )
self.tsInfo.resetResolved(hard=True)
- # if we are all clear, then we have to check that the whole current transaction
+
+ # if we are alel clear, then we have to check that the whole current transaction
# can complete the depsolve without error, because the packages skipped
# can have broken something that passed the tests earliere.
# FIXME: We need do this in a better way.
More information about the Yum-commits
mailing list