[yum-commits] Branch 'yum-3_2_X' - 2 commits - yum/__init__.py yum/rpmsack.py
James Antill
james at osuosl.org
Fri Jan 15 17:44:45 UTC 2010
yum/__init__.py | 1 +
yum/rpmsack.py | 17 +++++++++++------
2 files changed, 12 insertions(+), 6 deletions(-)
New commits:
commit e6308fc9eabfec73f1267b133f75e06132b2a0f9
Author: James Antill <james at and.org>
Date: Fri Jan 15 10:17:42 2010 -0500
Make installedFileRequires None, when we reset the rpmdb transaction.
Without this although we drop the cache from rpmdb, we've kept a copy
the depsolver uses internally ... so we now drop that too.
diff --git a/yum/__init__.py b/yum/__init__.py
index 1085f21..70ac05c 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -875,6 +875,7 @@ class YumBase(depsolve.Depsolve):
# but easier than removing/altering specific bits of the cache ...
# and skip-broken shouldn't care too much about speed.
self.rpmdb.transactionReset()
+ self.installedFileRequires = None # Kind of hacky
self.verbose_logger.debug(_("Skip-broken round %i"), count)
self._printTransaction()
depTree = self._buildDepTree()
commit b3a472e892ba5c837f540be72819bd1180022d99
Author: James Antill <james at and.org>
Date: Fri Jan 15 09:24:12 2010 -0500
Fix check_dups() to use provides as installonly does, Eg. kernel-PAE-devel
diff --git a/yum/rpmsack.py b/yum/rpmsack.py
index 2ffc820..6840a57 100644
--- a/yum/rpmsack.py
+++ b/yum/rpmsack.py
@@ -1123,22 +1123,27 @@ class RPMDBPackageSack(PackageSackBase):
problems.append(prob)
return problems
- def _iter_two_pkgs(self, ignore):
+ def _iter_two_pkgs(self, ignore_provides):
last = None
for pkg in sorted(self.returnPackages()):
- if pkg.name in ignore:
+ if pkg.name in ignore_provides:
continue
+ if ignore_provides.intersection(set(pkg.provides_names)):
+ continue
+
if last is None:
last = pkg
continue
yield last, pkg
last = pkg
- def check_duplicates(self, ignore=[]):
- """ Checks for any missing dependencies. """
-
+ def check_duplicates(self, ignore_provides=[]):
+ """ Checks for any "duplicate packages" (those with multiple versions
+ installed), we ignore any packages with a provide in the passed
+ provide list (this is how installonlyworks, so we do the same). """
+ ignore_provides = set(ignore_provides)
problems = []
- for last, pkg in self._iter_two_pkgs(ignore):
+ for last, pkg in self._iter_two_pkgs(ignore_provides):
if pkg.name != last.name:
continue
if pkg.verEQ(last) and pkg != last:
More information about the Yum-commits
mailing list