[rhel6-branch] Pulsing progress bar instead of the static popup during device discovery.

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

 



On machines with hundreds of devices Anaconda looks dead during device
discovery. Having a proper progress bar would be cooler but we don't know
how many devices will be there altogether.

Resolves: rhbz#616641
---
 storage/__init__.py   |    9 +++++----
 storage/devicetree.py |    5 ++++-
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index 007f029..d9c89fe 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -403,8 +403,9 @@ class Storage(object):
             if device.format.type == "luks" and device.format.exists:
                 self.__luksDevs[device.format.uuid] = device.format._LUKS__passphrase
 
-        w = self.anaconda.intf.waitWindow(_("Examining Devices"),
-                                          _("Examining storage devices"))
+        prog = self.anaconda.intf.progressWindow(_("Examining Devices"),
+                                                 _("Examining storage devices"),
+                                                 100, 0.03, pulse=True)
         self.iscsi.startup(self.anaconda.intf)
         self.fcoe.startup(self.anaconda.intf)
         self.zfcp.startup(self.anaconda.intf)
@@ -427,13 +428,13 @@ class Storage(object):
                                      iscsi=self.iscsi,
                                      dasd=self.dasd,
                                      mpathFriendlyNames=self.mpathFriendlyNames)
-        self.devicetree.populate()
+        self.devicetree.populate(prog)
         self.fsset = FSSet(self.devicetree, self.anaconda.rootPath)
         self.eddDict = get_edd_dict(self.partitioned)
         self.anaconda.id.rootParts = None
         self.anaconda.id.upgradeRoot = None
         self.dumpState("initial")
-        w.pop()
+        prog.pop()
 
     @property
     def devices(self):
diff --git a/storage/devicetree.py b/storage/devicetree.py
index b419026..0dc657f 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -2034,7 +2034,7 @@ class DeviceTree(object):
 
         return ret
 
-    def populate(self):
+    def populate(self, progressWindow):
         """ Locate all storage devices. """
         log.debug("DeviceTree.populate: ignoredDisks is %s ; exclusiveDisks is %s"
                     % (self._ignoredDisks, self.exclusiveDisks))
@@ -2074,6 +2074,7 @@ class DeviceTree(object):
         log.info("devices to scan: %s" % [d['name'] for d in devices])
         for dev in devices:
             self.addUdevDevice(dev)
+            progressWindow.pulse()
 
         # Having found all the disks, we can now find all the multipaths built
         # upon them.
@@ -2095,6 +2096,7 @@ class DeviceTree(object):
             self.__multipathConfigWriter.addMultipathDevice(mp)
             self._addDevice(mp)
             self.addUdevDevice(mp_info)
+            progressWindow.pulse()
         for d in self.devices:
             if not d.name in whitelist:
                 self.__multipathConfigWriter.addBlacklistDevice(d)
@@ -2126,6 +2128,7 @@ class DeviceTree(object):
             log.info("devices to scan: %s" % [d['name'] for d in devices])
             for dev in devices:
                 self.addUdevDevice(dev)
+                progressWindow.pulse()
 
         self.populated = True
 
-- 
1.7.5.4

_______________________________________________
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