summaryrefslogtreecommitdiffstats
path: root/partitioning.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2001-07-23 04:45:11 +0000
committerJeremy Katz <katzj@redhat.com>2001-07-23 04:45:11 +0000
commit66eb13014f6feff6f974a33feed3be245539673b (patch)
treef4bcba00d0d267598c953006bf97721dfc7cd164 /partitioning.py
parentc75df9d95e5d4e8532d72c444f5bb00da2c083ab (diff)
downloadanaconda-66eb13014f6feff6f974a33feed3be245539673b.tar.gz
anaconda-66eb13014f6feff6f974a33feed3be245539673b.tar.xz
anaconda-66eb13014f6feff6f974a33feed3be245539673b.zip
sanity checks for sizes need to actually look at the partition since
we could be a growable partition. so, now we need the diskset here too
Diffstat (limited to 'partitioning.py')
-rw-r--r--partitioning.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/partitioning.py b/partitioning.py
index 4022e1300..f437e64ab 100644
--- a/partitioning.py
+++ b/partitioning.py
@@ -507,7 +507,7 @@ def sanityCheckRaidRequest(reqpartitions, newraid, doPartitionCheck = 1):
# if there are none
# if baseChecks is set, the basic sanity tests which the UI runs prior to
# accepting a partition will be run on the requests
-def sanityCheckAllRequests(requests, baseChecks = 0):
+def sanityCheckAllRequests(requests, diskset, baseChecks = 0):
checkSizes = [('/usr', 250), ('/tmp', 50), ('/var', 50),
('/home', 100), ('/boot', 20)]
warnings = []
@@ -522,7 +522,17 @@ def sanityCheckAllRequests(requests, baseChecks = 0):
for (mount, size) in checkSizes:
req = requests.getRequestByMountPoint(mount)
- if req and req.size < size:
+ if not req:
+ continue
+ if req.type == REQUEST_RAID:
+ thissize = req.size
+ else:
+ part = get_partition_by_name(diskset.disks, req.device)
+ if not part:
+ thissize = req.size
+ else:
+ thissize = getPartSizeMB(part)
+ if thissize < size:
warnings.append(_("Your %s partition is less than %s megabytes which is lower than recommended for a normal Red Hat Linux install.") %(mount, size))
foundSwap = 0