Should storage ever get reset (which it can in the case of moving back to
the hub from reclaim, resulting in an error), any protected attributes will
be wiped. protectedDevSpecs is the definitive source for what's protected
and what's not.
The dev.protected lines are still there in case we do not hit an error.
---
pyanaconda/ui/gui/spokes/source.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index fc1aacc..9892fff 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -468,6 +468,7 @@ class SourceSpoke(NormalSpoke):
# Make sure anaconda doesn't touch this device.
part.protected = True
+ self.storage.config.protectedDevSpecs.append(part.name)
elif self._mirror_active():
# this preserves the url for later editing
self.data.method.method = None
@@ -529,6 +530,9 @@ class SourceSpoke(NormalSpoke):
# If the user moved from an HDISO method to some other, we need to
# clear the protected bit on that device.
if old_source.method == "harddrive" and old_source.partition:
+ if old_source.partition in self.storage.config.protectedDevSpecs:
+ self.storage.config.protectedDevSpecs.remove(old_source.partition)
+
dev = self.storage.devicetree.getDeviceByName(old_source.partition)
if dev:
dev.protected = False
--
1.7.11.2