diff options
author | Radek Vykydal <rvykydal@redhat.com> | 2010-03-19 17:24:21 +0100 |
---|---|---|
committer | Radek Vykydal <rvykydal@redhat.com> | 2010-03-24 11:17:37 +0100 |
commit | 5697307698648e830647234625bfbfe0c7e43f16 (patch) | |
tree | 03efe957e6730c40ef604b645a278ca648f78705 | |
parent | 5baf853189623b4ee52654b09d91a3e7bfc56988 (diff) | |
download | anaconda-5697307698648e830647234625bfbfe0c7e43f16.tar.gz anaconda-5697307698648e830647234625bfbfe0c7e43f16.tar.xz anaconda-5697307698648e830647234625bfbfe0c7e43f16.zip |
Update format of cdrom devices when looking for repos on media (#566269)
This is needed when repo location is changed to CD/DVD in repo UI
and the media was inserted after last storage population (e.g.
just during repo UI step).
-rw-r--r-- | image.py | 1 | ||||
-rw-r--r-- | storage/devicetree.py | 10 |
2 files changed, 11 insertions, 0 deletions
@@ -257,6 +257,7 @@ def scanForMedia(tree, storage): if dev.type != "cdrom": continue + storage.devicetree.updateDeviceFormat(dev) try: dev.format.mount(mountpoint=tree) except: diff --git a/storage/devicetree.py b/storage/devicetree.py index 11ac6ebc4..72958565d 100644 --- a/storage/devicetree.py +++ b/storage/devicetree.py @@ -37,6 +37,7 @@ import devicelibs.lvm import devicelibs.mpath from udev import * from .storage_log import log_method_call +import iutil import gettext _ = lambda x: gettext.ldgettext("anaconda", x) @@ -1785,6 +1786,15 @@ class DeviceTree(object): elif device.format.type == "multipath_member": self.handleMultipathMemberFormat(info, device) + def updateDeviceFormat(self, device): + log.debug("updating format of device: %s" % device) + iutil.notify_kernel("/sys%s" % device.sysfsPath) + udev_settle() + info = udev_get_device(device.sysfsPath) + self.handleUdevDeviceFormat(info, device) + if device.format.type: + log.debug("got format: %s" % device.format) + def _handleInconsistencies(self): def reinitializeVG(vg): # First we remove VG data |