diff options
author | Jeremy Katz <katzj@redhat.com> | 2007-12-11 17:18:17 -0500 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2007-12-11 17:56:22 -0500 |
commit | ae1b98e7dd5038a0a11ee03d46220c76727585e8 (patch) | |
tree | 98c8cac009169eccb2182950d60993f6a7791bbf /partitions.py | |
parent | 2284081df239e4baab516b666eaae0caa923015d (diff) | |
download | anaconda-ae1b98e7dd5038a0a11ee03d46220c76727585e8.tar.gz anaconda-ae1b98e7dd5038a0a11ee03d46220c76727585e8.tar.xz anaconda-ae1b98e7dd5038a0a11ee03d46220c76727585e8.zip |
Simplify this logic a little and blacklist ext4 from being a bootreq
Diffstat (limited to 'partitions.py')
-rw-r--r-- | partitions.py | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/partitions.py b/partitions.py index 2b399d12b..335c46afc 100644 --- a/partitions.py +++ b/partitions.py @@ -1067,38 +1067,30 @@ class Partitions: bootreqs = self.getBootableRequest() if bootreqs: for bootreq in bootreqs: - if (bootreq and - (isinstance(bootreq, partRequests.RaidRequestSpec)) and - (not raid.isRaid1(bootreq.raidlevel))): + if not bootreq: + continue + if (isinstance(bootreq, partRequests.RaidRequestSpec) and + not raid.isRaid1(bootreq.raidlevel)): errors.append(_("Bootable partitions can only be on RAID1 " "devices.")) # can't have bootable partition on LV - if (bootreq and - (isinstance(bootreq, - partRequests.LogicalVolumeRequestSpec))): + if (isinstance(bootreq, partRequests.LogicalVolumeRequestSpec)): errors.append(_("Bootable partitions cannot be on a " "logical volume.")) # most arches can't have boot on RAID - if (bootreq and - (isinstance(bootreq, partRequests.RaidRequestSpec)) and - (rhpl.getArch() not in raid.raidBootArches)): - errors.append("Bootable partitions cannot be on a RAID " - "device.") - - # XFS causes all kinds of disasters for being /boot. - # disallow it. #138673 and others. - if (bootreq and bootreq.fstype and - bootreq.fstype.getName() == "xfs"): - errors.append("Bootable partitions cannot be on an XFS " - "filesystem.") - - # no gfs support in grub - if (bootreq and bootreq.fstype and - bootreq.fstype.getName() == "gfs2"): - errors.append("Bootable partitions cannot be on a GFS2 " - "filesystem.") + if (isinstance(bootreq, partRequests.RaidRequestSpec) and + rhpl.getArch() not in raid.raidBootArches): + errors.append(_("Bootable partitions cannot be on a RAID " + "device.")) + + # XFS causes problems as /boot. see #138673 and others + # gfs2 and ext4 aren't supported by grub + if (bootreq.fstype and + bootreq.fstype.getName() in ("xfs", "gfs2", "ext4")): + errors.append(_("Bootable partitions cannot be on an %s " + "filesystem.")%(bootreq.fstype.getName(),)) if foundSwap == 0: |