[anaconda][master/rhel7-branch][2/3] Show unformatted DASDs in the local disk store. (#1064423)

Samantha N. Bueno sbueno+anaconda at redhat.com
Mon Mar 3 17:53:37 UTC 2014


Since the installer can handle unformatted DASDs, all of them should
be viewable and selectable from the storage spoke.

Resolves: rhbz#1064423
---
 pyanaconda/ui/lib/disks.py | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/pyanaconda/ui/lib/disks.py b/pyanaconda/ui/lib/disks.py
index 87abc9a..d5d7e12 100644
--- a/pyanaconda/ui/lib/disks.py
+++ b/pyanaconda/ui/lib/disks.py
@@ -57,11 +57,17 @@ def getDisks(devicetree, fake=False):
         else:
             devices += devicetree._hidden
 
-        disks = [d for d in devices if d.isDisk and
-                                       d.mediaPresent and
-                                       not d.format.hidden and
-                                       not (d.protected and
-                                            d.removable)]
+        disks = []
+        for d in devices:
+            if d.isDisk and not d.format.hidden and not (d.protected and d.removable):
+                # unformatted DASDs are detected with a size of 0, but they should
+                # still show up as valid disks if this function is called, since we
+                # can still use them; anaconda will know how to handle them, so they
+                # don't need to be ignored anymore
+                if d.type == "dasd":
+                    disks.append(d)
+                elif d.size > 0 and d.mediaPresent:
+                    disks.append(d)
     else:
         disks = []
         disks.append(FakeDisk("sda", size=300000, free=10000, serial="00001",
-- 
1.8.3.1



More information about the anaconda-patches mailing list