[yum-commits] Branch 'yum-3_2_X' - yum/__init__.py
skvidal at osuosl.org
skvidal at osuosl.org
Fri Nov 7 20:05:55 UTC 2008
yum/__init__.py | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
New commits:
commit 563f25f55324691a76d120d666c7055f74504284
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Fri Nov 7 15:04:20 2008 -0500
make sure we mark as obsoleted pkgs when we do an install.
closes rh bug 470440
diff --git a/yum/__init__.py b/yum/__init__.py
index dcf1654..316d11e 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -2508,8 +2508,19 @@ class YumBase(depsolve.Depsolve):
self.install(po=obsoleting_pkg)
continue
- txmbr = self.tsInfo.addInstall(po)
- tx_return.append(txmbr)
+ # at this point we are going to mark the pkg to be installed, make sure
+ # it doesn't obsolete anything. If it does, mark that in the tsInfo, too
+ if po.pkgtup in self.up.getObsoletesList(name=po.name, arch=po.arch):
+ for (obstup, inst_tup) in self.up.getObsoletesTuples(name=po.name,
+ arch=po.arch):
+ if po.pkgtup == obstup:
+ installed_pkg = self.rpmdb.searchPkgTuple(inst_tup)[0]
+ txmbr = self.tsInfo.addObsoleting(po, installed_pkg)
+ self.tsInfo.addObsoleted(installed_pkg, po)
+ tx_return.append(txmbr)
+ else:
+ txmbr = self.tsInfo.addInstall(po)
+ tx_return.append(txmbr)
return tx_return
More information about the Yum-commits
mailing list