[PATCH 04/11] Don't re-add deleted or hidden devices during DeviceTree.populate.
dlehman at redhat.com
Tue Feb 5 21:13:16 UTC 2013
blivet/devicetree.py | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index a627398..5972b62 100644
@@ -922,6 +922,21 @@ class DeviceTree(object):
uuid = udev_device_get_uuid(info)
sysfs_path = udev_device_get_sysfs_path(info)
+ # make sure this device was not scheduled for removal and also has not
+ # been hidden
+ removed = [a.device for a in
+ self.findActions(type="destroy", object="device")]
+ for ignored in removed + self._hidden:
+ if (sysfs_path and ignored.sysfsPath == sysfs_path) or \
+ (uuid and uuid in (ignored.uuid, ignored.format.uuid)):
+ if ignored in removed:
+ reason = "removed"
+ reason = "hidden"
+ log.debug("skipping %s device %s" % (reason, name))
# make sure we note the name of every device we see
if name not in self.names:
More information about the anaconda-patches