This is stuff I turned up testing the new device factory classes.
Single means no raid features. --- pyanaconda/ui/gui/spokes/custom.glade | 6 ++++++ pyanaconda/ui/gui/spokes/custom.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.glade b/pyanaconda/ui/gui/spokes/custom.glade index 98f4911..a91e505 100644 --- a/pyanaconda/ui/gui/spokes/custom.glade +++ b/pyanaconda/ui/gui/spokes/custom.glade @@ -2024,6 +2024,12 @@ until you click on the main menu's 'Begin Installation' button.</property> </columns> <data> <row> + <col id="0" translatable="yes">Single <span foreground="grey">(No RAID)</span></col> + <col id="1">False</col> + <col id="2">False</col> + <col id="3">True</col> + </row> + <row> <col id="0" translatable="yes">RAID0 <span foreground="grey">(Performance)</span></col> <col id="1">True</col> <col id="2">True</col> diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py index 3b98811..ddeee30 100644 --- a/pyanaconda/ui/gui/spokes/custom.py +++ b/pyanaconda/ui/gui/spokes/custom.py @@ -1345,7 +1345,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
# Set a default RAID level in the combo. for (i, row) in enumerate(raid_combo.get_model()): - if row[0].startswith(raid_level.upper()): + if row[0].upper().startswith(raid_level.upper()): raid_combo.set_active(i) break
This was happening when switching from one btrfs subvol to another. Earlier in populate_right_side we set the fstype combo to sensitive and since the device type didn't get changed that handler didn't set it back to insensitive like it should be for btrfs. --- pyanaconda/ui/gui/spokes/custom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py index ddeee30..77e308d 100644 --- a/pyanaconda/ui/gui/spokes/custom.py +++ b/pyanaconda/ui/gui/spokes/custom.py @@ -1478,8 +1478,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker): device.originalFormat.type not in self._fs_types: fsCombo.append_text(device.originalFormat.name)
- fsCombo.set_sensitive(self._reformatCheckbox.get_active()) - ## ## Set up the device type combo. ## @@ -1570,6 +1568,8 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker): self._device_name_dict[_type] = name
typeCombo.set_active(type_index_map[device_type]) + fsCombo.set_sensitive(self._reformatCheckbox.get_active() and + device_type != DEVICE_TYPE_BTRFS)
# you can't change the type of an existing device typeCombo.set_sensitive(not use_dev.exists)
--- pyanaconda/ui/gui/spokes/custom.py | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py index 77e308d..394408b 100644 --- a/pyanaconda/ui/gui/spokes/custom.py +++ b/pyanaconda/ui/gui/spokes/custom.py @@ -1383,6 +1383,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker): selectedDeviceDescLabel = self.builder.get_object("selectedDeviceDescLabel") typeCombo = self.builder.get_object("deviceTypeCombo") fsCombo = self.builder.get_object("fileSystemTypeCombo") + raidLevelCombo = self.builder.get_object("raidLevelCombo")
device = selector._device if device.type == "luks/dm-crypt": @@ -1573,6 +1574,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
# you can't change the type of an existing device typeCombo.set_sensitive(not use_dev.exists) + raidLevelCombo.set_sensitive(not use_dev.exists)
# you can't encrypt a btrfs subvolume -- only the volume/container encryptCheckbox.set_sensitive(device_type != DEVICE_TYPE_BTRFS)
--- pyanaconda/ui/gui/spokes/custom.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py index 394408b..0661a06 100644 --- a/pyanaconda/ui/gui/spokes/custom.py +++ b/pyanaconda/ui/gui/spokes/custom.py @@ -2308,6 +2308,12 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker): exists = self._current_selector and self._current_selector._device.exists self._configButton.set_sensitive(not exists and new_type != DEVICE_TYPE_LVM)
+ # this has to be done before calling populate_raid since it will need + # the raid level combo to contain the relevant raid levels for the new + # device type + raidStoreFilter = self.builder.get_object("raidStoreFiltered") + raidStoreFilter.refilter() + self._populate_raid(raid_level, size_from_entry(self._sizeEntry)) self._populate_lvm()
@@ -2343,9 +2349,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker): fs_type_sensitive) # end btrfs magic
- raidStoreFilter = self.builder.get_object("raidStoreFiltered") - raidStoreFilter.refilter() - def clear_errors(self): self._error = None self.clear_info()
anaconda-patches@lists.fedorahosted.org