diff options
author | Hans de Goede <hdegoede@redhat.com> | 2010-02-08 14:32:13 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2010-02-09 10:37:18 +0100 |
commit | 2afb550e87f0f503bd2a42a45e3e62fd8ab5e273 (patch) | |
tree | e0a5cbfac6e907dd8d84effaa9537a1468f9eb07 /platform.py | |
parent | d9e87d8b6abdcef95d839ed974e26776614bc8b4 (diff) | |
download | anaconda-2afb550e87f0f503bd2a42a45e3e62fd8ab5e273.tar.gz anaconda-2afb550e87f0f503bd2a42a45e3e62fd8ab5e273.tar.xz anaconda-2afb550e87f0f503bd2a42a45e3e62fd8ab5e273.zip |
Fix backtrace when trying to use LV for /boot (#562325)
Diffstat (limited to 'platform.py')
-rw-r--r-- | platform.py | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/platform.py b/platform.py index f1ff194dd..f65211048 100644 --- a/platform.py +++ b/platform.py @@ -229,13 +229,20 @@ class EFI(Platform): if req.format.type != "efi": errors.append(_("/boot/efi is not EFI.")) - disk = req.disk.format.partedDisk + # Don't try to check the disklabel on lv's etc, using lv for /boot + # is already checked in the generic Platform.checkBootRequest() + if req.type == "partition": + partitions = [ req ] + elif req.type == "mdarray": + partitions = filter(lambda d: d.type == "partition", req.parents) # Check that we've got a correct disk label. - labelType = self.diskLabelType(disk.device.type) - if disk.type != labelType: - errors.append(_("%s must have a %s disk label.") - % (req.disk.name, labelType.upper())) + for p in partitions: + partedDisk = p.disk.format.partedDisk + labelType = self.diskLabelType(partedDisk.device.type) + if partedDisk.type != labelType: + errors.append(_("%s must have a %s disk label.") + % (p.disk.name, labelType.upper())) return errors @@ -265,7 +272,7 @@ class Alpha(Platform): def checkBootRequest(self, req): errors = Platform.checkBootRequest(self, req) - if not req or not req.disk: + if not req or req.type != "partition" or not req.disk: return errors disk = req.disk.format.partedDisk @@ -408,7 +415,7 @@ class NewWorldPPC(PPC): def checkBootRequest(self, req): errors = PPC.checkBootRequest(self, req) - if not req or not req.disk: + if not req or req.type != "partition" or not req.disk: return errors disk = req.disk.format.partedDisk |