[PATCH 2/2] Inform parents when their child is added back to the devicetree

David Lehman dlehman at redhat.com
Mon Sep 15 18:04:07 UTC 2014


On 09/11/2014 09:09 AM, Vratislav Podzimek wrote:
> Otherwise their self.kids counter contains and invalid value.
>
> Related: rhbz#1085201
> Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
> ---
>   blivet/devicetree.py | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/blivet/devicetree.py b/blivet/devicetree.py
> index c4cb1b7..021ad45 100644
> --- a/blivet/devicetree.py
> +++ b/blivet/devicetree.py
> @@ -520,8 +520,10 @@ class DeviceTree(object):
>               # remove the device from the tree
>               self._removeDevice(action.device)
>           elif action.isDestroy and action.isDevice:
> -            # add the device back into the tree
> +            # add the device back into the tree and inform parents about it
>               self._addDevice(action.device)
> +            for parent in action.device.parents:
> +                parent.addChild()
>
>           action.cancel()
>           self._actions.remove(action)
>

FWIW this is also covered by the set I'm testing now.

David


More information about the anaconda-patches mailing list