[yum-commits] Branch 'yum-3_2_X' - yum/__init__.py
Tim Lauridsen
timlau at osuosl.org
Mon Oct 27 08:11:20 UTC 2008
yum/__init__.py | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
New commits:
commit 3f5ac4d048da54f29f45be0269a05dc892236c24
Author: Tim Lauridsen <timlau at fedoraproject.org>
Date: Mon Oct 27 09:07:35 2008 +0100
- Added extra skip-broken debug output, so we better can see what is going on
- don't remove the same package from pkgSack & up more than once
- make sure that the compat arch packages get removed from the pkgSack & up
too and not just from the transaction, else they can get pulled in again
in the next depsolve loop.
diff --git a/yum/__init__.py b/yum/__init__.py
index 3806a5c..d7f2daa 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -676,14 +676,20 @@ class YumBase(depsolve.Depsolve):
return
self._getPackagesToRemove(po, depTree, toRemove)
# Only remove non installed packages from pkgSack
- if not po.repoid == 'installed':
+ _remove_from_sack(po)
+
+ def _remove_from_sack(po):
+ if not po.repoid == 'installed' and po not in removed_from_sack:
+ self.verbose_logger.debug('SKIPBROKEN: removing %s from pkgSack & updates' % str(po))
self.pkgSack.delPackage(po)
self.up.delPackage(po.pkgtup)
+ removed_from_sack.add(po)
# Keep removing packages & Depsolve until all errors is gone
# or the transaction is empty
count = 0
skipped_po = set()
+ removed_from_sack = set()
orig_restring = restring # Keep the old error messages
while len(self.po_with_problems) > 0 and rescode == 1:
count += 1
@@ -701,6 +707,9 @@ class YumBase(depsolve.Depsolve):
skipped = self._skipFromTransaction(po)
for skip in skipped:
skipped_po.add(skip)
+ # make sure we get the combat arch packages skip from pkgSack and up too.
+ if skip not in removed_from_sack and skip.repoid == 'installed':
+ _remove_from_sack(skip)
if not toRemove: # Nothing was removed, so we still got a problem
break # Bail out
rescode, restring = self.resolveDeps()
More information about the Yum-commits
mailing list