summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--autopart.py10
2 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 8cd91d518..fb1db9e9f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-01-09 Peter Jones <pjones@redhat.com>
+
+ * autopart.py (fitConstrained): Use per-arch minimum for the starting
+ sector of partitions.
+
2007-01-09 David Cantrell <dcantrell@redhat.com>
* vnc.py (askVncWindow): Only ask the user to run VNC if Xvnc is
diff --git a/autopart.py b/autopart.py
index fda41912a..e86fe4744 100644
--- a/autopart.py
+++ b/autopart.py
@@ -191,6 +191,11 @@ class partlist:
self.parts = []
+def getMinimumSector():
+ # XXX really this should be based on the disk label type, not the arch
+ if rhpl.getArch() == "sparc":
+ return 1L
+ return 0L
# first step of partitioning voodoo
# partitions with a specific start and end cylinder requested are
@@ -225,8 +230,9 @@ def fitConstrained(diskset, requests, primOnly=0, newParts = None):
raise PartitioningError, "Unable to create partition which extends beyond the end of the disk."
# XXX need to check overlaps properly here
- if startSec < 0:
- startSec = 0L
+ minSec = getMinimumSector()
+ if startSec < minSec:
+ startSec = minSec
if disk.type.check_feature(parted.DISK_TYPE_EXTENDED) and disk.extended_partition: