diff options
author | Jeremy Katz <katzj@redhat.com> | 2001-06-20 20:20:59 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2001-06-20 20:20:59 +0000 |
commit | 1302afe594bb5eb3eb4854accd71a81858f506ea (patch) | |
tree | c6d15627bb108699adb27bf3cf1aafb04fe3744b /autopart.py | |
parent | 0e756ae97a3533b6860568e92300a974b0e1df6c (diff) | |
download | anaconda-1302afe594bb5eb3eb4854accd71a81858f506ea.tar.gz anaconda-1302afe594bb5eb3eb4854accd71a81858f506ea.tar.xz anaconda-1302afe594bb5eb3eb4854accd71a81858f506ea.zip |
primary only should work now
Diffstat (limited to 'autopart.py')
-rw-r--r-- | autopart.py | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/autopart.py b/autopart.py index 00e254143..4c009f1c5 100644 --- a/autopart.py +++ b/autopart.py @@ -47,10 +47,14 @@ def bestPartType(disk): # first step of partitioning voodoo # partitions with a specific start and end cylinder requested are # placed where they were asked to go -def fitConstrained(diskset, requests): +def fitConstrained(diskset, requests, primOnly=0): for request in requests.requests: if request.type != REQUEST_NEW: continue + if request.device: + continue + if primOnly and not request.primary: + continue if request.drive and (request.start != None) and request.end: fsType = request.fstype.getPartedFileSystemType() disk = diskset.disks[request.drive] @@ -96,7 +100,6 @@ def fitConstrained(diskset, requests): "a flag that is not available.") newp.set_flag(flag, 1) request.device = PartedPartitionDevice(newp).getDevice() - request.realDevice = request.device request.currentDrive = drive return PARTITION_SUCCESS @@ -104,13 +107,15 @@ def fitConstrained(diskset, requests): # fit partitions of a specific size with or without a specific disk # into the freespace -def fitSized(diskset, requests): +def fitSized(diskset, requests, primOnly = 0): todo = {} for request in requests.requests: if request.type != REQUEST_NEW: continue - if request.realDevice: + if request.device: + continue + if primOnly and not request.primary: continue if not request.drive: request.drive = diskset.disks.keys() @@ -323,6 +328,15 @@ def processPartitioning(diskset, requests): # priority partition (/boot or /) # size + # run through with primary only constraints first + ret = fitConstrained(diskset, requests, 1) + if ret == PARTITION_FAIL: + return ret + + ret = fitSized(diskset, requests, 1) + if ret == PARTITION_FAIL: + return ret + ret = fitConstrained(diskset, requests) if ret == PARTITION_FAIL: return ret |