Tested this in a virt using reproducer from bug 614812 comment #1 Also ran into new bug 657115 and fixed it with dlehman's help
Brian C. Lane (2): Rescan disks when moving back through upgrade check (#614812) Ignore immutable disks in clearPartitions (#657115)
iw/autopart_type.py | 8 ++++++++ iw/examine_gui.py | 10 ++++++++++ storage/partitioning.py | 4 ++++ 3 files changed, 22 insertions(+), 0 deletions(-)
We rescan when moving forward from autopart, but not back, so when there is something to upgrade we need to also rescan when moving back to the upgrade screen.
Resolves: rhbz#614812 --- iw/autopart_type.py | 8 ++++++++ iw/examine_gui.py | 10 ++++++++++ 2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/iw/autopart_type.py b/iw/autopart_type.py index fbc4391..9c0ae97 100644 --- a/iw/autopart_type.py +++ b/iw/autopart_type.py @@ -147,6 +147,14 @@ class PartitionTypeWindow(InstallWindow): if self.storage.checkNoDisks(): raise gui.StayOnScreen
+ # reset storage, this is only done when moving forward, not back + # temporarily unset storage.clearPartType so that all devices will be + # found during storage reset + clearPartType = self.anaconda.id.storage.clearPartType + self.anaconda.id.storage.clearPartType = None + self.anaconda.id.storage.reset() + self.anaconda.id.storage.clearPartType = clearPartType + self.storage.clearPartChoice = self.buttonGroup.getCurrent()
if self.buttonGroup.getCurrent() == "custom": diff --git a/iw/examine_gui.py b/iw/examine_gui.py index 688d3ca..d1099cf 100644 --- a/iw/examine_gui.py +++ b/iw/examine_gui.py @@ -90,6 +90,16 @@ class UpgradeExamineWindow (InstallWindow): else: self.doupgrade = self.anaconda.id.upgrade
+ if anaconda.dir == DISPATCH_BACK: + # reset storage to catch any changes since we only reset when + # moving forward from autopart, not back. + # temporarily unset storage.clearPartType so that all devices will be + # found during storage reset + clearPartType = self.anaconda.id.storage.clearPartType + self.anaconda.id.storage.clearPartType = None + self.anaconda.id.storage.reset() + self.anaconda.id.storage.clearPartType = clearPartType + # we might get here after storage reset that obsoleted # root device objects we had found if not self.anaconda.id.rootParts:
Related: rhbz#614812 Resolves: rhbz#657115 --- storage/partitioning.py | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/storage/partitioning.py b/storage/partitioning.py index e12b3e3..6e9b1ae 100644 --- a/storage/partitioning.py +++ b/storage/partitioning.py @@ -410,6 +410,10 @@ def clearPartitions(storage): (storage.clearPartDisks and disk.name not in storage.clearPartDisks): continue
+ # Don't touch immutable disks + if disk.immutable: + continue + # don't reinitialize the disklabel if the disk contains install media if filter(lambda p: p.dependsOn(disk), storage.protectedDevices): continue
Brian C. Lane (2): Rescan disks when moving back through upgrade check (#614812) Ignore immutable disks in clearPartitions (#657115)
iw/autopart_type.py | 8 ++++++++ iw/examine_gui.py | 10 ++++++++++ storage/partitioning.py | 4 ++++ 3 files changed, 22 insertions(+), 0 deletions(-)
I'm fine with both.
- Chris
anaconda-devel@lists.fedoraproject.org