David Lehman wrote:
On Tue, 2009-04-28 at 13:48 +0200, Radek Vykydal wrote:This only fixes the traceback, but not the deeper cause which is that we are not editing original format request, but our last request (edit), so e.g. in 2nd edit "Original filesystem type" label and "Migrate" option are wrong (reflecting our last request, not the original format). I added some more conditions so that we do not display the info and do not offer migration in such cases. Note that the checks also affect non-raid existing partition editing in the same sense. The conditions should be kept when the behavior is fixed.This looks good. Should there be corresponding patches to partition_dialog_gui.py and lvm_dialog_gui.py?
For the traceback preventing change in raid_dialog_gui.py, there is not corresponding logic in lvm_dialog_gui.py or partition_dialog_gui.py. Changes in partition_ui_helpers.py (added conditions for availability of Migrate and Resize in 2nd and further edit) affect editing of both existing normal partitions and lvs (they are calling changed createPreExistFSOptionSection(). Change concerning displaying of "Original filesystem type" label in raid_dialog_gui.py [*] should be made also in lvm_dialog_gui.py (editLogicalVolume),
so yes there should probably be a corresponding patch.
--- iw/partition_ui_helpers_gui.py | 4 ++-- iw/raid_dialog_gui.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/iw/partition_ui_helpers_gui.py b/iw/partition_ui_helpers_gui.py index 1ff2d5f..f73903e 100644 --- a/iw/partition_ui_helpers_gui.py +++ b/iw/partition_ui_helpers_gui.py @@ -337,7 +337,7 @@ def createPreExistFSOptionSection(origrequest, maintable, row, mountCombo, # this gets added to the table a bit later on lukscb = gtk.CheckButton(_("_Encrypt"))- if origfs.migratable:+ if origfs.migratable and origfs.exists: migratecb = gtk.CheckButton(label=_("Mi_grate filesystem to:")) if formatcb is not None: migratecb.set_active(origfs.migrate and (not formatcb.get_active())) @@ -367,7 +367,7 @@ def createPreExistFSOptionSection(origrequest, maintable, row, mountCombo, (fstypeCombo, mountCombo, origfs, lukscb, migfstypeCombo, migratecb, FLAG_FORMAT))- if origrequest.resizable:+ if origrequest.resizable and origfs.exists: resizecb = gtk.CheckButton(label=_("_Resize")) resizecb.set_active(origfs.resizable and \ (origfs.currentSize != origfs.targetSize) and \ diff --git a/iw/raid_dialog_gui.py b/iw/raid_dialog_gui.py index 652a050..49626c3 100644 --- a/iw/raid_dialog_gui.py +++ b/iw/raid_dialog_gui.py @@ -384,7 +384,7 @@ class RaidEditor: lbl.set_mnemonic_widget(self.fstypeCombo) maintable.attach(self.fstypeCombo, 1, 2, row, row + 1) row += 1 - else: + elif format.exists:
[*] lvm_dialog_gui.py should be probably patched in similar way
maintable.attach(createAlignedLabel(_("Original File System Type:")), 0, 1, row, row + 1) if format.type: @@ -490,7 +490,7 @@ class RaidEditor: # format or not? self.formatButton = None self.fsoptionsDict = {} - if not format.exists: + if not format.exists and not origrequest.exists: self.formatButton = gtk.CheckButton(_("_Format partition?")) if not format.type: self.formatButton.set_active(1)_______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list
_______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list