[yum-commits] Branch 'yum-3_2_X' - yum/__init__.py

skvidal at osuosl.org skvidal at osuosl.org
Wed Feb 25 04:55:10 UTC 2009


 yum/__init__.py |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 76e7e92afd107b6b9c6441b8dadb3d8333ca93fe
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Tue Feb 24 23:53:52 2009 -0500

    make sure if a reinstall of a pkg cannot happen that we remove the removal
    of that package from the transaction set.

diff --git a/yum/__init__.py b/yum/__init__.py
index f2d2488..58567cf 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -3021,6 +3021,7 @@ class YumBase(depsolve.Depsolve):
             # for now, banned and dropped.
             if self.allowedMultipleInstalls(item.po):
                 self.tsInfo.remove(item.pkgtup)
+                tx_mbrs.remove(item)
                 msg = _("Package %s is allowed multiple installs, skipping") % item.po
                 self.verbose_logger.log(logginglevels.INFO_2, msg)
                 continue
@@ -3028,10 +3029,12 @@ class YumBase(depsolve.Depsolve):
             members = self.install(name=item.name, arch=item.arch,
                            ver=item.version, release=item.release, epoch=item.epoch)
             if len(members) == 0:
+                self.tsInfo.remove(item.pkgtup)
+                tx_mbrs.remove(item)
                 raise Errors.ReinstallError, _("Problem in reinstall: no package matched to install")
             new_members.extend(members)
 
-        tx_mbrs.extend(new_members)            
+        tx_mbrs.extend(new_members)
         return tx_mbrs
         
 


More information about the Yum-commits mailing list