[Yum-devel] [PATCH] Solve some of the obsoletes are conflicts mess. testObsoletesOffPostAvail2+
James Antill
james at and.org
Wed Sep 28 20:56:20 UTC 2011
---
yum/depsolve.py | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/yum/depsolve.py b/yum/depsolve.py
index 8fe4952..699a23c 100644
--- a/yum/depsolve.py
+++ b/yum/depsolve.py
@@ -816,6 +816,19 @@ class Depsolve(object):
if checkdep:
break # The next conflict might be the same pkg
+ # check Obsoletes
+ # Atm. This is _just_ checking for transaction members which
+ # obsolete each other. Because rpm will now auto. obs. those
+ # anyway. We _don't_ check for installed pkgs. which might obs.
+ # something to be installed, even though rpm will also do that.
+ for txmbr in self.tsInfo.getMembersWithState(None, output_states=TS_INSTALL_STATES):
+ for obs_n in txmbr.po.obsoletes_names:
+ for otxmbr in self.tsInfo.matchNaevr(name=obs_n):
+ if otxmbr.output_state not in TS_INSTALL_STATES:
+ continue
+ if otxmbr.po.obsoletedBy([txmbr.po]):
+ self.tsInfo.remove(otxmbr.pkgtup)
+
if CheckDeps:
if self.dsCallback: self.dsCallback.restartLoop()
self.verbose_logger.log(logginglevels.DEBUG_1, _('Restarting Loop'))
--
1.7.6.2
More information about the Yum-devel
mailing list