summaryrefslogtreecommitdiffstats
path: root/autopart.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2001-08-09 04:28:40 +0000
committerJeremy Katz <katzj@redhat.com>2001-08-09 04:28:40 +0000
commitb75fcfa659c395b7bfdf9fa3237275e02737eeea (patch)
tree565d6a5289d72c3542b7ee6bbc18f6ac103a762d /autopart.py
parentd23fc546047fbbd5e1f4d5ca08ccdfb0fcbd814b (diff)
downloadanaconda-b75fcfa659c395b7bfdf9fa3237275e02737eeea.tar.gz
anaconda-b75fcfa659c395b7bfdf9fa3237275e02737eeea.tar.xz
anaconda-b75fcfa659c395b7bfdf9fa3237275e02737eeea.zip
use the freespace prior to allocating any partitions to determine what
we should try to get percentage wise (51146)
Diffstat (limited to 'autopart.py')
-rw-r--r--autopart.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/autopart.py b/autopart.py
index a3cc77b69..84effa958 100644
--- a/autopart.py
+++ b/autopart.py
@@ -471,6 +471,7 @@ def growParts(diskset, requests, newParts):
continue
growSize[drive] = growSize[drive] + origSize[request.uniqueID]
+ thisFreeSize = getFreeSpace(diskset)[1]
# loop over requests for this drive
for request in growList:
# skip if we've finished growing this request
@@ -494,9 +495,10 @@ def growParts(diskset, requests, newParts):
# compute fraction of freespace which to give to this
# request. Weight by original request size
percent = origSize[request.uniqueID] / (growSize[drive] * 1.0)
- maxsect = long(percent * freeSize[drive]) + startSize
+ maxsect = long(percent * thisFreeSize[drive]) + startSize
-# print "percent, maxsect, free", percent,maxsect,freeSize[drive]
+# print request
+# print "percent, maxsect, free", percent,maxsect,freeSize[drive], startSize, lastFreeSize
# print "max is ",maxsect
imposedMax = 0
if request.maxSize: