diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py
index 9400539..a0b7fa6 100644
--- a/pyanaconda/storage/devicetree.py
+++ b/pyanaconda/storage/devicetree.py
@@ -1158,13 +1158,10 @@ class DeviceTree(object):
labelType = self.platform.bestDiskLabelType(device)
try:
- # XXX if initlabel is True we don't ever instantiate a format
- # for the original disklabel, so we will only have a
- # DeviceFormat instance to destroy.
format = getFormat("disklabel",
device=device.path,
labelType=labelType,
- exists=not initlabel)
+ exists=True)
except InvalidDiskLabelError:
# if we have a cb function use it. else we ignore the device.
if initcb is not None and initcb():
diff --git a/pyanaconda/storage/partitioning.py b/pyanaconda/storage/partitioning.py
index b00d5a4..49faa78 100644
--- a/pyanaconda/storage/partitioning.py
+++ b/pyanaconda/storage/partitioning.py
@@ -511,13 +511,16 @@ def clearPartitions(storage, bootloader=None):
# now remove any empty extended partitions
removeEmptyExtendedPartitions(storage)
- # make sure that the the boot device has the correct disklabel type if
- # we're going to completely clear it.
+ # make sure that the the boot device, along with any other disk we are
+ # supposed to reinitialize, has the correct disklabel type if we're going
+ # to completely clear it.
+ boot_drive = getattr(bootloader, "stage1_drive", None)
for disk in storage.partitioned:
- if not bootloader or not bootloader.stage1_drive:
+ if not boot_drive and not storage.config.reinitializeDisks:
break
- if disk != bootloader.stage1_drive:
+ if not storage.config.reinitializeDisks and
+ (boot_drive is not None and disk != boot_drive):
continue
if storage.config.clearPartType != CLEARPART_TYPE_ALL or
--
1.7.8.4
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list