[PATCH rhel6-branch] Fix the partitioning section of interactive kickstart installs (#641861).

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

 



Note that behavior around going back from the examining UI to the part
type UI can be a little weird.  If you have a kickstart file with partition
commands in it and you go back, those commands will be forgotten.  This is
because we have no way of reloading the kickstart data short of reexecuting
the entire file (which is too messy).

On the other hand, it's kind of what you'd expect - if you go back from any
step, your choices are blanked out so you try again from scratch.
---
 iw/autopart_type.py |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/iw/autopart_type.py b/iw/autopart_type.py
index 1931e9e..3179ebe 100644
--- a/iw/autopart_type.py
+++ b/iw/autopart_type.py
@@ -145,6 +145,9 @@ class PartitionTypeWindow(InstallWindow):
         ics.setTitle("Automatic Partitioning")
         ics.setNextEnabled(True)
 
+    def _isInteractiveKS(self):
+        return self.anaconda.isKickstart and self.anaconda.id.ksdata.interactive.interactive
+
     def getNext(self):
         if self.storage.checkNoDisks():
             raise gui.StayOnScreen
@@ -152,10 +155,12 @@ class PartitionTypeWindow(InstallWindow):
         # reset storage, this is only done when moving forward, not back
         # temporarily unset storage.clearPartType so that all devices will be
         # found during storage reset
-        clearPartType = self.anaconda.id.storage.clearPartType
-        self.anaconda.id.storage.clearPartType = None
-        self.anaconda.id.storage.reset()
-        self.anaconda.id.storage.clearPartType = clearPartType
+        if not self._isInteractiveKS() or \
+               (self._isInteractiveKS() and len(self.storage.devicetree.findActions(type="create")) == 0):
+            clearPartType = self.anaconda.id.storage.clearPartType
+            self.anaconda.id.storage.clearPartType = None
+            self.anaconda.id.storage.reset()
+            self.anaconda.id.storage.clearPartType = clearPartType
 
         self.storage.clearPartChoice = self.buttonGroup.getCurrent()
 
@@ -193,7 +198,9 @@ class PartitionTypeWindow(InstallWindow):
                 self.storage.retrofitPassphrase = False
                 self.storage.encryptedAutoPart = False
 
-            self.storage.doAutoPart = True
+            if not self._isInteractiveKS() or \
+               (self._isInteractiveKS() and len(self.storage.devicetree.findActions(type="create")) == 0):
+                self.storage.doAutoPart = True
 
             self.dispatch.skipStep("cleardiskssel", skip = 0)
             if self.reviewButton.get_active():
-- 
1.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