pld-builder.new: PLD_Builder/install.py uninstall() always succeeds; remove...

arekm arekm at pld-linux.org
Fri May 22 11:57:43 CEST 2009


Author: arekm                        Date: Fri May 22 09:57:43 2009 GMT
Module: pld-builder.new               Tag: HEAD
---- Log message:
uninstall() always succeeds; remove one by one

---- Files affected:
pld-builder.new/PLD_Builder:
   install.py (1.23 -> 1.24) 

---- Diffs:

================================================================
Index: pld-builder.new/PLD_Builder/install.py
diff -u pld-builder.new/PLD_Builder/install.py:1.23 pld-builder.new/PLD_Builder/install.py:1.24
--- pld-builder.new/PLD_Builder/install.py:1.23	Wed May 20 09:54:15 2009
+++ pld-builder.new/PLD_Builder/install.py	Fri May 22 11:57:38 2009
@@ -67,6 +67,7 @@
             res = chroot.run("rpm -e %s" % k, logfile = b.logfile, user = "root")
             if res != 0:
                 b.log_line("package removal failed")
+                return False
             else:
                 b.log_line("packages removed sucessfuly")
         else:
@@ -90,12 +91,11 @@
         b.log_line("error: conflicting packages uninstallation failed")
         return False
     else:
-        k = string.join(conflicting.keys())
-        b.log_line("removing %s" % k)
-        res = chroot.run("poldek --noask --erase %s" % k, logfile = b.logfile, user = "root")
-        if res != 0:
-            b.log_line("package removal failed")
-            return False
+        for k in conflicting.keys():
+            b.log_line("removing %s" % k)
+            res = chroot.run("poldek --noask --erase %s" % k, logfile = b.logfile, user = "root")
+            if res != 0:
+                b.log_line("package %s removal failed" % k)
     return True
 
 def uninstall_self_conflict(b):
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-builder.new/PLD_Builder/install.py?r1=1.23&r2=1.24&f=u



More information about the pld-cvs-commit mailing list