A Patch that fixes yume to avoid a false-positive warning from yum (bug in yum 
reported upstream and fixed (may be in centos-6.4 or later).

It also avoid doing bootstrap operations on some distro in / which could be 
dangerous.

Olivier.

--
   Olivier LAHAYE
   CEA DRT/LIST/DCSI/DIR
Index: pkgsrc/yume/trunk/yume
===================================================================
--- pkgsrc/yume/trunk/yume	(révision 9474)
+++ pkgsrc/yume/trunk/yume	(copie de travail)
@@ -229,17 +229,20 @@
         $cmd .= " -d $verbose -e 2";
     }
     if ($installroot) {
-        # special handling for empty images
-        if ((scalar(grep /^install$/, @ARGV) == 1) &&
-            &img_empty($installroot)) {
-            # try creating lock directory, if it fails we'll fail in
-            # other place anyway
-            system("mkdir -p $installroot/var/lock/rpm");
-            if ((&distro_repos() eq "suse") || (&distro_repos() eq "sles")) {
-                &bootstrap_suse($installroot);
+        # Avoid treating / (current system) as an image. (and avoid --installrot /)
+        if ($installroot ne "/") {
+            # special handling for empty images
+            if ((scalar(grep /^install$/, @ARGV) == 1) &&
+                &img_empty($installroot)) {
+                # try creating lock directory, if it fails we'll fail in
+                # other place anyway
+                system("mkdir -p $installroot/var/lock/rpm");
+                if ((&distro_repos() eq "suse") || (&distro_repos() eq "sles")) {
+                    &bootstrap_suse($installroot);
+                }
             }
+        $cmd .= " --installroot $installroot";
         }
-        $cmd .= " --installroot $installroot";
     }
     my @yumargs = @ARGV;
 
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Oscar-devel mailing list
Oscar-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oscar-devel

Reply via email to