[rhel6-branch] Only pass exclusiveDisks for autopart (#852523)

Brian C. Lane bcl at redhat.com
Fri Jun 28 17:43:15 UTC 2013


From: "Brian C. Lane" <bcl at redhat.com>

If part --ondisk is combined with clearpart --drives the set of disks may
be different so we only need to pass exclusiveDisks for the autopart case.

(thanks to dlehman for the patch).

Resolves: rhbz#852523
---
 storage/partitioning.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/storage/partitioning.py b/storage/partitioning.py
index e20a18f..2daa4bb 100644
--- a/storage/partitioning.py
+++ b/storage/partitioning.py
@@ -245,9 +245,14 @@ def doAutoPartition(anaconda):
     log.warning("not sanity checking devices because I don't know how yet")
 
     # run the autopart function to allocate and grow partitions
+    if anaconda.id.storage.doAutoPart:
+        exclusiveDisks = anaconda.id.storage.clearPartDisks[:]
+    else:
+        exclusiveDisks = None
+
     try:
         doPartitioning(anaconda.id.storage,
-                       exclusiveDisks=anaconda.id.storage.clearPartDisks)
+                       exclusiveDisks=exclusiveDisks)
 
         if anaconda.id.storage.doAutoPart:
             _scheduleLVs(anaconda, devs)
-- 
1.8.1.4



More information about the anaconda-patches mailing list