[rhel7-branch][PATCH] Fix interactive partitioning with incomplete kickstart (#1032124)
Martin Kolman
mkolman at redhat.com
Fri Jan 10 15:47:35 UTC 2014
Interactive partitioning configuration is now correctly accepted
on the first pass even when installing with an incomplete kickstart.
Signed-off-by: Martin Kolman <mkolman at redhat.com>
---
pyanaconda/ui/gui/spokes/storage.py | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index b70331f..46f46a4 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -332,9 +332,11 @@ class StorageSpoke(NormalSpoke, StorageChecker):
self.disks = []
if not flags.automatedInstall:
- # default to using autopart for interactive installs
+ # default to using autopart for interactive installs,
+ # when user installs with and incomplete kickstart that
+ # does not specify storage configuration, he needs to
+ # enter the storage spoke and confirm the configuration
self.data.autopart.autopart = True
-
self.autopart = self.data.autopart.autopart
self.autoPartType = None
self.clearPartType = CLEARPART_TYPE_NONE
@@ -344,6 +346,8 @@ class StorageSpoke(NormalSpoke, StorageChecker):
self._last_clicked_overview = None
self._cur_clicked_overview = None
+ self._visited_by_user = False
+
def _applyDiskSelection(self, use_names):
onlyuse = use_names[:]
for disk in (d for d in self.storage.disks if d.name in onlyuse):
@@ -536,6 +540,17 @@ class StorageSpoke(NormalSpoke, StorageChecker):
self._cur_clicked_overview = overview
def refresh(self):
+ if not self._visited_by_user:
+ self._visited_by_user = True
+ self.data.autopart.autopart = True
+ # When installing without kickstart, autopart is enabled during storage spoke
+ # initialization. But when installing with an incomplete kickstart that does not
+ # specify the storage configuration, autopart is not enabled in initialize
+ # as we want the user to enter storage spoke and confirm the configuration.
+ # As refresh is called for the first time when user enters the storage spoke,
+ # we enable autopart here and only do it on the first visit so as not to override
+ # any changes done by the user in the spoke.
+
self.disks = getDisks(self.storage.devicetree)
# synchronize our local data store with the global ksdata
--
1.8.4.2
More information about the anaconda-patches
mailing list