[PATCH] Skip non-udev devices as optical media candidates (#1009809)
David Lehman
dlehman at redhat.com
Tue Sep 24 01:29:22 UTC 2013
On Mon, 2013-09-23 at 17:31 -0400, David Shea wrote:
> ---
> pyanaconda/image.py | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/pyanaconda/image.py b/pyanaconda/image.py
> index 5fe3833..a7422ec 100644
> --- a/pyanaconda/image.py
> +++ b/pyanaconda/image.py
> @@ -193,6 +193,10 @@ def opticalInstallMedia(devicetree, mountpoint=INSTALL_TREE):
> # created from ISO images.
> for dev in set(devicetree.getDevicesByType("cdrom") + \
> [d for d in devicetree.devices if d.format.type == "iso9660"]):
> + if not dev.sysfsPath:
> + # No udev information
> + continue
> +
> devicetree.updateDeviceFormat(dev)
> if not hasattr(dev.format, "mount"):
> # no mountable media
I think this is papering over possibly several other problems. I'd
consider two other changes instead of this one:
1. continue as above, but do so 'if not device.controllable' instead of
'if not device.sysfsPath'. That'll filter out several devices we should
be ignoring.
2. add a check to DeviceTree.updateDeviceFormat so it logs an error and
returns early if 'not info' just before calling
self.handleUdevDeviceFormat.
David
More information about the anaconda-patches
mailing list