[PATCH 3/7] Run clearpart, autopart, bootloader from the storage spoke.

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

 



We need to run these before the progress hub so we can catch errors.
---
 pyanaconda/install.py               |    6 ------
 pyanaconda/ui/gui/spokes/custom.py  |    6 ------
 pyanaconda/ui/gui/spokes/storage.py |   20 ++++++++++++++++++++
 3 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/pyanaconda/install.py b/pyanaconda/install.py
index d377c40..ac5fe42 100644
--- a/pyanaconda/install.py
+++ b/pyanaconda/install.py
@@ -48,12 +48,6 @@ def doInstall(storage, payload, ksdata, instClass):
     from pyanaconda import progress
     from pyanaconda.kickstart import runPostScripts
 
-    # First, run the execute methods of ksdata that prepare the system for
-    # installation.
-    ksdata.clearpart.execute(storage, ksdata, instClass)
-    ksdata.bootloader.execute(storage, ksdata, instClass)
-    ksdata.autopart.execute(storage, ksdata, instClass)
-
     # We really only care about actions that affect filesystems, since
     # those are the ones that take the most time.
     steps = len(storage.devicetree.findActions(type="create", object="format")) + \
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index bbb58d2..bf1589c 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -493,12 +493,6 @@ class CustomPartitioningSpoke(NormalSpoke):
         from pyanaconda.storage.devices import DiskDevice
         from pyanaconda.storage.partitioning import doAutoPartition
 
-        # Pick the first disk to be the destination device for the bootloader.
-        # This appears to be the minimum amount of configuration required to
-        # make autopart happy with the bootloader settings.
-        if not self.data.bootloader.bootDrive:
-            self.data.bootloader.bootDrive = self.storage.bootloader.disks[0].name
-
         # Then do autopartitioning.  We do not do any clearpart first.  This is
         # custom partitioning, so you have to make your own room.
         # FIXME:  Handle all the autopart exns here.
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index ee7af5e..c3eb48d 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -249,9 +249,29 @@ class StorageSpoke(NormalSpoke):
     def apply(self):
         self.data.clearpart.drives = self.selected_disks[:]
         self.data.autopart.autopart = self.autopart
+
+        # no thanks, lvm
+        self.data.autopart.lvm = False
+
+        if self.autopart:
+            self.clearPartType = CLEARPART_TYPE_ALL
+        else:
+            self.clearPartType = CLEARPART_TYPE_NONE
+
         self.data.bootloader.location = "mbr"
+
+        # Pick the first disk to be the destination device for the bootloader.
+        # This appears to be the minimum amount of configuration required to
+        # make autopart happy with the bootloader settings.
+        if not self.data.bootloader.bootDrive:
+            self.data.bootloader.bootDrive = self.storage.bootloader.disks[0].name
+
         self.data.clearpart.type = self.clearPartType
 
+        self.data.clearpart.execute(self.storage, self.data, self.instclass)
+        self.data.bootloader.execute(self.storage, self.data, self.instclass)
+        self.data.autopart.execute(self.storage, self.data, self.instclass)
+
     @property
     def completed(self):
         return self.status != _("No disks selected")
-- 
1.7.7.6

_______________________________________________
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