[PATCH 1/5] Mountpoint validation should only care about the new fs type
Vratislav Podzimek
vpodzime at redhat.com
Fri Apr 4 19:54:19 UTC 2014
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
pyanaconda/ui/gui/spokes/custom.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 708aef5..4203eb4 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -605,7 +605,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
else:
log.warning("failed to replace device: %s", s._device)
- def _validate_mountpoint(self, mountpoint, device, device_type, fs_type, new_fs_type,
+ def _validate_mountpoint(self, mountpoint, device, device_type, new_fs_type,
reformat, encrypted, raid_level):
error = None
if device_type != DEVICE_TYPE_PARTITION and mountpoint == "/boot/efi":
@@ -614,11 +614,11 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
elif device_type != DEVICE_TYPE_PARTITION and \
new_fs_type in PARTITION_ONLY_FORMAT_TYPES:
error = (_("%(fs)s must be on a device of type %(type)s")
- % {"fs" : fs_type, "type" : _(DEVICE_TEXT_PARTITION)})
+ % {"fs" : new_fs_type, "type" : _(DEVICE_TEXT_PARTITION)})
elif mountpoint and encrypted and mountpoint.startswith("/boot"):
error = _("%s cannot be encrypted") % mountpoint
elif encrypted and new_fs_type in PARTITION_ONLY_FORMAT_TYPES:
- error = _("%s cannot be encrypted") % fs_type
+ error = _("%s cannot be encrypted") % new_fs_type
elif mountpoint == "/" and device.format.exists and not reformat:
error = _("You must create a new filesystem on the root device.")
elif device_type == DEVICE_TYPE_MD and raid_level in (None, "single"):
@@ -769,8 +769,8 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
## VALIDATION
##
error = self._validate_mountpoint(mountpoint, device, device_type,
- fs_type, new_fs_type,
- reformat, encrypted, raid_level)
+ fs_type_str, reformat, encrypted,
+ raid_level)
if error:
self.set_warning(error)
self.window.show_all()
--
1.9.0
More information about the anaconda-patches
mailing list