Re: [PATCH] (take II) Update format of cdrom devices when looking for repos on media (#566269)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ack for master. I don't have a feel for the severity of this, so if you
want it in F13 please use the blocker process or else convince me. As of
Thursday it'll be out of my hands (blockers only).

Dave

On Tue, 2010-03-23 at 15:43 +0100, Radek Vykydal wrote:
> 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).
> 
> Second take, using iutil.notify_kernel rather then udev_trigger,
> with logging added - as Dave Lehman suggested. It's tested.
> 
> ---
>  image.py              |    1 +
>  storage/devicetree.py |   10 ++++++++++
>  2 files changed, 11 insertions(+), 0 deletions(-)
> 
> diff --git a/image.py b/image.py
> index e15de12..60f03aa 100644
> --- a/image.py
> +++ b/image.py
> @@ -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 386d23f..fd3613d 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)
> @@ -1780,6 +1781,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


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux