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

Tim Lauridsen timlau at osuosl.org
Tue Feb 9 12:19:15 UTC 2010


 yum/__init__.py |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit f8c15289427c24130a7cdf5bf2f9eb524fc3fa19
Author: Tim Lauridsen <timlau at fedoraproject.org>
Date:   Sun Feb 7 09:25:22 2010 +0100

    make old installonly packages been erased by installonly_limit depend on the new one, so they will get pulled by skipbroken if the new installonly is pulled because of dep problems (rhbz #561928)

diff --git a/yum/__init__.py b/yum/__init__.py
index cb06d1b..d77d0e0 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -4097,10 +4097,14 @@ class YumBase(depsolve.Depsolve):
                                 continue
                             if numleft == 0:
                                 break
-                            toremove.append(po)
+                            toremove.append([po,m])
                             numleft -= 1
                         
-        map(self.tsInfo.addErase, toremove)
+        for po,rel in toremove:
+            txmbr = self.tsInfo.addErase(toremove)
+            # Add a dep relation to the new version of the package, causing this one to be erased
+            # this way skipbroken, should clean out the old one, if the new one is skipped
+            txmbr.depends_on.append(rel)
 
     def processTransaction(self, callback=None,rpmTestDisplay=None, rpmDisplay=None):
         '''


More information about the Yum-commits mailing list