[PATCH] Clear internal dasd list when resetting storage (#823534)

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

 



---
 pyanaconda/storage/__init__.py |    4 ++++
 pyanaconda/storage/dasd.py     |    4 ++++
 2 files changed, 8 insertions(+)

diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
index 27c7249..465cf2a 100644
--- a/pyanaconda/storage/__init__.py
+++ b/pyanaconda/storage/__init__.py
@@ -471,6 +471,10 @@ class Storage(object):
         if getattr(self.anaconda, "upgrade", False):
             self.config.clearPartType = CLEARPART_TYPE_NONE
 
+        if self.dasd:
+            # Reset the internal dasd list (823534)
+            self.dasd.clear_device_list()
+
         self.devicetree = DeviceTree(intf=self.intf,
                                      conf=self.config,
                                      passphrase=self.encryptionPassphrase,
diff --git a/pyanaconda/storage/dasd.py b/pyanaconda/storage/dasd.py
index 800ffe5..aceba6d 100644
--- a/pyanaconda/storage/dasd.py
+++ b/pyanaconda/storage/dasd.py
@@ -196,6 +196,10 @@ class DASD:
         if dasd:
             self._devices.append(dasd)
 
+    def clear_device_list(self):
+        """ Clear the device list to force re-populate on next access. """
+        self._devices = []
+
     def write(self):
         """ Write /etc/dasd.conf to target system for all DASD devices
             configured during installation.
-- 
1.7.10.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