[2/2 anaconda] Call setUpBootLoader in custom autopart (#1086811)

Brian C. Lane bcl at redhat.com
Tue Jun 24 23:09:04 UTC 2014


doAutopartition needs stage1_disk to be setup, otherwise it rejects the
existing ESP. At this stage not everything is setup for a clean run of
setUpBootLoader so it needs to be called with the new 'early' keyword so
that it will skip trying to setup stage1_device which would raise an
error because the mountpoint on it hasn't been set yet.
---
 anaconda.spec.in                   | 2 +-
 pyanaconda/ui/gui/spokes/custom.py | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/anaconda.spec.in b/anaconda.spec.in
index 1bb458f..4b73cfb 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -91,7 +91,7 @@ The anaconda package is a metapackage for the Anaconda installer.
 %package core
 Summary: Core of the Anaconda installer
 Requires: dnf >= %{dnfver}
-Requires: python-blivet >= 0.56
+Requires: python-blivet >= 0.58
 Requires: python-meh >= %{mehver}
 Requires: libreport-anaconda >= 2.0.21-1
 Requires: libselinux-python
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 18c1759..5c91069 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -2175,6 +2175,9 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
         self._storage_playground.doAutoPart = True
         self.clear_errors()
         try:
+            # doAutoPartitions needs stage1_disk setup so it will reuse existing partitions
+            self._storage_playground.setUpBootLoader(early=True)
+
             doAutoPartition(self._storage_playground, self.data)
         except NoDisksError as e:
             # No handling should be required for this.
-- 
1.9.3



More information about the anaconda-patches mailing list