From dde35fa5cfcd1151a05a8d4efa0609f723cb58e1 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Fri, 6 Jul 2001 01:53:24 +0000 Subject: move autopart strings to bottom of file bootable requests from partitions can be /boot/efi on ia64 make sure bootable request gets on the earliest drive possible and warn if they go beyond the 1024th cylinder on x86 --- partitioning.py | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'partitioning.py') diff --git a/partitioning.py b/partitioning.py index 6865dcfa1..6fb150769 100644 --- a/partitioning.py +++ b/partitioning.py @@ -24,6 +24,7 @@ import math import raid import fsset import os +import iutil from translate import _ from log import log from constants import * @@ -56,6 +57,13 @@ class PartitioningError: def __str__ (self): return self.value +class PartitioningWarning: + def __init__ (self, value): + self.value = value + + def __str__ (self): + return self.value + def get_flags (part): string="" if not part.is_active (): @@ -455,9 +463,9 @@ class PartitionSpec: size = None, grow = 0, maxSize = None, mountpoint = None, origfstype = None, start = None, end = None, partnum = None, - drive = None, primary = None, secondary = None, - format = None, migrate = None, options = None, - constraint = None, + drive = None, primary = None, + format = None, options = None, + constraint = None, migrate = None, raidmembers = None, raidlevel = None, raidspares = None): # @@ -484,7 +492,6 @@ class PartitionSpec: self.partnum = partnum self.drive = drive self.primary = primary - self.secondary = secondary self.format = format self.migrate = migrate self.options = options @@ -507,6 +514,9 @@ class PartitionSpec: # unique id for each request self.uniqueID = None + # ignore booting constraints for this request + self.ignoreBootConstraints = 0 + def __str__(self): if self.fstype: fsname = self.fstype.getName() @@ -680,7 +690,12 @@ class Partitions: # return name of boot mount point in current requests def getBootableRequest(self): - bootreq = self.getRequestByMountPoint("/boot") + bootreq = None + + if not bootreq and iutil.getArch() == "ia64": + bootreq = self.getRequestByMountPoint("/boot/efi") + if not bootreq: + bootreq = self.getRequestByMountPoint("/boot") if not bootreq: bootreq = self.getRequestByMountPoint("/") @@ -696,6 +711,11 @@ class Partitions: self.requests[n] = request self.requests[index] = tmp n = n + 1 + tmp = self.getBootableRequest() + if tmp: + index = self.requests.index(tmp) + self.requests[index] = self.requests[0] + self.requests[0] = tmp def copy (self): new = Partitions() -- cgit