[PATCH 04/11] Don't re-add deleted or hidden devices during DeviceTree.populate.
dlehman at redhat.com
Mon Feb 4 23:46:38 UTC 2013
On Mon, 2013-02-04 at 17:32 -0600, David Lehman wrote:
> blivet/devicetree.py | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
> diff --git a/blivet/devicetree.py b/blivet/devicetree.py
> index a627398..eee8ed6 100644
> --- a/blivet/devicetree.py
> +++ b/blivet/devicetree.py
> @@ -922,6 +922,19 @@ 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 = self.findActions(type="destroy", object="device")
> + for ignored in removed + self._hidden:
> + if ignored.sysfsPath == sysfs_path or \
> + uuid in (ignored.uuid, ignored.format.uuid):
> + if ignored in removed:
> + reason = "removed"
> + else:
> + reason = "hidden"
> + log.debug("skipping %s device %s" % (reason, name))
There's a missing 'return' above, right after the logging.
> # make sure we note the name of every device we see
> if name not in self.names:
More information about the anaconda-patches