[PATCH f21-branch/master] Update checkSizes to work in terms of Size objects (#1129629).
Chris Lumens
clumens at redhat.com
Tue Oct 21 14:05:48 UTC 2014
Other changes in anaconda broke the assumption in this code that we were working
in terms of MB, so get rid of that assumption.
---
pyanaconda/storage_utils.py | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/pyanaconda/storage_utils.py b/pyanaconda/storage_utils.py
index 7d26e78..0d41356 100644
--- a/pyanaconda/storage_utils.py
+++ b/pyanaconda/storage_utils.py
@@ -165,8 +165,8 @@ def sanity_check(storage, min_ram=isys.MIN_RAM):
exns = []
- checkSizes = [('/usr', 250), ('/tmp', 50), ('/var', 384),
- ('/home', 100), ('/boot', 200)]
+ checkSizes = [('/usr', Size("250 MiB")), ('/tmp', Size("50 MiB")), ('/var', Size("384 MiB")),
+ ('/home', Size("100 MiB")), ('/boot', Size("200 MiB"))]
mustbeonlinuxfs = ['/', '/var', '/tmp', '/usr', '/home', '/usr/share', '/usr/lib']
mustbeonroot = ['/bin','/dev','/sbin','/etc','/lib','/root', '/mnt', 'lost+found', '/proc']
@@ -175,7 +175,7 @@ def sanity_check(storage, min_ram=isys.MIN_RAM):
swaps = storage.fsset.swapDevices
if root:
- if root.size < 250:
+ if root.size < Size("250 MiB"):
exns.append(
SanityWarning(_("Your root partition is less than 250 "
"megabytes which is usually too small to "
@@ -207,9 +207,8 @@ def sanity_check(storage, min_ram=isys.MIN_RAM):
if mount in filesystems and filesystems[mount].size < size:
exns.append(
SanityWarning(_("Your %(mount)s partition is less than "
- "%(size)s megabytes which is lower than "
- "recommended for a normal %(productName)s "
- "install.")
+ "%(size)s which is lower than recommended "
+ "for a normal %(productName)s install.")
% {'mount': mount, 'size': size,
'productName': productName}))
--
1.9.3
More information about the anaconda-patches
mailing list