[PATCH 1/4] Do not hide non-existent devices. (#1027846)

David Lehman dlehman at redhat.com
Tue Nov 12 17:44:26 UTC 2013


We do not want to play the game of "saving" a planned layout for a
subset of disks and then trying to reconcile that with the contents
of the other visible disks when the user chooses to unhide one.
---
 blivet/devicetree.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index 0b8dc36..bad135c 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -1772,11 +1772,15 @@ class DeviceTree(object):
 
         # we're intentionally not modifying self.names here
         self._devices.remove(device)
-        self._hidden.append(device)
-        lvm.lvm_cc_addFilterRejectRegexp(device.name)
         for parent in device.parents:
             parent.removeChild()
 
+        if not device.exists:
+            return
+
+        self._hidden.append(device)
+        lvm.lvm_cc_addFilterRejectRegexp(device.name)
+
         if isinstance(device, DASDDevice):
             self.dasd.removeDASD(device)
 
-- 
1.8.1.4



More information about the anaconda-patches mailing list