[PATCH] Handle hd iso leavings by dracut (#876897)

Chris Lumens clumens at redhat.com
Fri Nov 16 14:26:17 UTC 2012


> diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
> index b52fb67..1a8b91c 100644
> --- a/pyanaconda/packaging/yumpayload.py
> +++ b/pyanaconda/packaging/yumpayload.py
> @@ -498,7 +498,14 @@ reposdir=%s
>      @property
>      def ISOImage(self):
>          if self.data.method.method == "harddrive":
> -            return get_mount_device(INSTALL_TREE)[len(ISO_DIR)+1:]
> +            # This could either be mounted to INSTALL_TREE or on
> +            # DRACUT_REPODIR if dracut did the mount.
> +            dev = get_mount_device(INSTALL_TREE)
> +            if dev:
> +                return dev[len(ISO_DIR)+1:]
> +            dev = get_mount_device(DRACUT_REPODIR)
> +            if dev:
> +                return dev[len(DRACUT_ISODIR)+1:]
>  
>      def _setUpMedia(self, device):
>          method = self.data.method

As a member of the Anti Indentation Task Force, might I recommend:

    def ISOImage(self):
        if self.data.method.method != "harddrive":
            return None

        ...

- Chris


More information about the anaconda-patches mailing list