[Yum-devel] [PATCH 3/3] Fix problems with remove+update.
James Antill
james at and.org
Fri Oct 8 21:02:30 UTC 2010
---
yum/__init__.py | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/yum/__init__.py b/yum/__init__.py
index 7445f9e..6a7db7a 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -3597,6 +3597,9 @@ class YumBase(depsolve.Depsolve):
self.tsInfo.addObsoleted(obsoletee, po)
tx_return.append(txmbr)
else:
+ if self.tsInfo.getMembersWithState(installed_pkg.pkgtup,
+ TS_REMOVE_STATES):
+ self.tsInfo.remove(installed_pkg.pkgtup)
txmbr = self._add_up_txmbr(requiringPo, po, installed_pkg)
tx_return.append(txmbr)
@@ -3620,6 +3623,9 @@ class YumBase(depsolve.Depsolve):
else:
updated_pkg = self.getInstalledPackageObject(updated)
+ if self.tsInfo.getMembersWithState(updated,
+ TS_REMOVE_STATES):
+ self.tsInfo.remove(updated)
txmbr = self._add_up_txmbr(requiringPo,
available_pkg, updated_pkg)
tx_return.append(txmbr)
@@ -3716,8 +3722,8 @@ class YumBase(depsolve.Depsolve):
if self.tsInfo.getMembers(po.pkgtup):
# This allows multiple reinstalls and update/downgrade "cancel"
for txmbr in self.tsInfo.matchNaevr(po.name):
- self.logger.warning(_("Removing %s from the transaction") %
- txmbr)
+ self.logger.info(_("Removing %s from the transaction") %
+ txmbr)
self.tsInfo.remove(txmbr.pkgtup)
# Now start the remove/reinstall
txmbr = self.tsInfo.addErase(po)
--
1.7.2.3
More information about the Yum-devel
mailing list