All pastes #614684 Raw Edit

Someone

public text v1 · immutable
·published 2007-07-11 18:41 UTC
rendered paste body
Index: fsset.py
===================================================================
RCS file: /usr/local/CVS/anaconda/fsset.py,v
retrieving revision 1.300.4.20
diff -u -p -r1.300.4.20 fsset.py
--- fsset.py    6 Jul 2007 22:42:57 -0000       1.300.4.20
+++ fsset.py    11 Jul 2007 18:31:52 -0000
@@ -1471,10 +1471,11 @@ MAILADDR root
             if part and part.is_flag_available(parted.PARTITION_BOOT):
                 part.set_flag(parted.PARTITION_BOOT, 1)
             return
-        
+
+        bpFoundActive = False
+        bootPart = None
         for drive in diskset.disks.keys():
-            foundActive = 0
-            bootPart = None
+            foundactive = False
             disk = diskset.disks[drive]
             part = disk.next_partition()
             while part:
@@ -1483,28 +1484,30 @@ MAILADDR root
                     continue
 
                 if not part.is_flag_available(parted.PARTITION_BOOT):
-                    foundActive = 1
+                    foundActive = True
                     part = None
                     continue
 
                 if part.get_flag(parted.PARTITION_BOOT):
-                    foundActive = 1
+                    foundActive = True
                     part = None
                     continue
 
                 if not bootPart:
+                    bpFoundActive = foundActive
                     bootPart = part
 
                 if partedUtils.get_partition_name(part) == bootDev:
+                    bpFoundActive = foundActive
                     bootPart = part
                 
                 part = disk.next_partition(part)
 
-            if bootPart and not foundActive:
-                bootPart.set_flag(parted.PARTITION_BOOT, 1)
+        if bootPart and not bpFoundActive:
+            bootPart.set_flag(parted.PARTITION_BOOT, 1)
 
-            if bootPart:
-                del bootPart
+        if bootPart:
+            del bootPart
 
     def formatSwap (self, chroot, forceFormat=False):
         formatted = []