summaryrefslogtreecommitdiffstats
path: root/pyanaconda/platform.py
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2011-12-06 12:25:47 -0600
committerDavid Lehman <dlehman@redhat.com>2011-12-19 11:19:11 -0600
commit0254ad8d8c6635d67c08a2ad28a84bfae9c880f9 (patch)
treea0b08fd5aec627233273b3d2e304fcf85c91d06c /pyanaconda/platform.py
parentb357cb60579bf1739a4b6a5773b36073594ad54f (diff)
downloadanaconda-0254ad8d8c6635d67c08a2ad28a84bfae9c880f9.tar.gz
anaconda-0254ad8d8c6635d67c08a2ad28a84bfae9c880f9.tar.xz
anaconda-0254ad8d8c6635d67c08a2ad28a84bfae9c880f9.zip
Fix sense of disklabel size check and add some logging.
Resolves: rhbz#671230
Diffstat (limited to 'pyanaconda/platform.py')
-rw-r--r--pyanaconda/platform.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/pyanaconda/platform.py b/pyanaconda/platform.py
index c70b8822b..56a17cd85 100644
--- a/pyanaconda/platform.py
+++ b/pyanaconda/platform.py
@@ -99,14 +99,20 @@ class Platform(object):
"""The best disklabel type for the specified device."""
# if there's a required type for this device type, use that
labelType = self.requiredDiskLabelType(device.partedDevice.type)
+ log.debug("required disklabel type for %s (%s) is %s"
+ % (device.name, device.partedDevice.type, labelType))
if not labelType:
# otherwise, use the first supported type for this platform
# that is large enough to address the whole device
labelType = self.defaultDiskLabelType
+ log.debug("default disklabel type for %s is %s" % (device.name,
+ labelType))
for lt in self.diskLabelTypes:
l = parted.freshDisk(device=device.partedDevice, ty=lt)
- if l.maxPartitionStartSector < device.partedDevice.length:
+ if l.maxPartitionStartSector > device.partedDevice.length:
labelType = lt
+ log.debug("selecting %s disklabel for %s based on size"
+ % (labelType, device.name))
break
return labelType