[PATCH 6/9] Adjust DeviceTree.isIgnored's handling of loop, ram, and live devices.

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

 



The change to include loop, ram, and live image devices in the
devicetree broke isIgnored when device filtering is used.

Related: rhbz#681608
---
 pyanaconda/storage/devicetree.py |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py
index 8054a2d..46394d5 100644
--- a/pyanaconda/storage/devicetree.py
+++ b/pyanaconda/storage/devicetree.py
@@ -550,9 +550,20 @@ class DeviceTree(object):
 
         # never ignore mapped disk images. if you don't want to use them,
         # don't specify them in the first place
-        if udev_device_is_dm_anaconda(info):
+        if udev_device_is_dm_anaconda(info) or udev_device_is_dm_livecd(info):
             return False
 
+        # Ignore loop and ram devices, we normally already skip these in
+        # udev.py: enumerate_block_devices(), but we can still end up trying
+        # to add them to the tree when they are slaves of other devices, this
+        # happens for example with the livecd
+        if name.startswith("ram"):
+            return True
+
+        if name.startswith("loop"):
+            # ignore loop devices unless they're backed by a file
+            return (not devicelibs.loop.get_backing_file(name))
+
         # We want exclusiveDisks to operate on anything that could be
         # considered a directly usable disk, ie: fwraid array, mpath, or disk.
         #
@@ -570,17 +581,6 @@ class DeviceTree(object):
                 self.addIgnoredDisk(name)
                 return True
 
-        # Ignore loop and ram devices, we normally already skip these in
-        # udev.py: enumerate_block_devices(), but we can still end up trying
-        # to add them to the tree when they are slaves of other devices, this
-        # happens for example with the livecd
-        if name.startswith("ram"):
-            return True
-
-        if name.startswith("loop"):
-            # ignore loop devices unless they're backed by a file
-            return (not devicelibs.loop.get_backing_file(name))
-
         # FIXME: check for virtual devices whose slaves are on the ignore list
 
     def addUdevLVDevice(self, info):
-- 
1.7.3.5

_______________________________________________
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