[PATCH] Do not allow users to migrate ext4 to ext4.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Noticed that ext4 filesystems were presenting users with a 'migrate to'
combo box with 'ext4' as the only entry.  Tracked down the problem to
the migratable property override in Ext3FS.  Changed it around to use
helper functions with property() and the UI is working more sanely now.
Users cannot select ext4 as the migration target for ext4.
---
 storage/formats/fs.py |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/storage/formats/fs.py b/storage/formats/fs.py
index 6330825..d784341 100644
--- a/storage/formats/fs.py
+++ b/storage/formats/fs.py
@@ -679,8 +679,7 @@ class FS(DeviceFormat):
 
     options = property(_getOptions, _setOptions)
 
-    @property
-    def migratable(self):
+    def _isMigratable(self):
         """ Can filesystems of this type be migrated? """
         return bool(self._migratable and self.migratefsProg and
                     filter(lambda d: os.access("%s/%s"
@@ -689,6 +688,8 @@ class FS(DeviceFormat):
                            os.environ["PATH"].split(":")) and
                     self.migrationTarget)
 
+    migratable = property(_isMigratable)
+
     def _setMigrate(self, migrate):
         if not migrate:
             self._migrate = migrate
@@ -874,11 +875,10 @@ class Ext3FS(Ext2FS):
 
         return size
 
-    @property
-    def migratable(self):
+    def _isMigratable(self):
         """ Can filesystems of this type be migrated? """
         return (flags.cmdline.has_key("ext4migrate") and
-                Ext2FS.migratable)
+                Ext2FS._isMigratable(self))
 
 register_device_format(Ext3FS)
 
-- 
1.6.2.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux