From: "Brian C. Lane" <bcl(a)redhat.com>
Text mode kickstart behavior was inconsistent, it would allow an
installation to continue even though the space check failed. Every other
install method stops, letting the user add more space before continuing.
Resolves: rhbz#1320436
---
pyanaconda/ui/tui/hubs/summary.py | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/pyanaconda/ui/tui/hubs/summary.py b/pyanaconda/ui/tui/hubs/summary.py
index 9dab613..1e680d7 100644
--- a/pyanaconda/ui/tui/hubs/summary.py
+++ b/pyanaconda/ui/tui/hubs/summary.py
@@ -69,16 +69,20 @@ def prompt(self, args=None):
incompleteSpokes = [spoke for spoke in self._keys.values()
if spoke.mandatory and not spoke.completed]
- # do a bit of final sanity checking, make sure pkg selection
- # size < available fs space
- if flags.automatedInstall:
- if self._checker and not self._checker.check():
- print(self._checker.error_message)
- if not incompleteSpokes:
- self.close()
- return None
+ # Kickstart space check failure either stops the automated install or
+ # raises an error when using cmdline mode.
+ if flags.automatedInstall and self._checker and not self._checker.check():
+ print(self._checker.error_message)
+ if not flags.ksprompt:
+ log.error("CmdlineError: %s", self._checker.error_message)
+ raise CmdlineError(self._checker.error_message)
+ elif flags.automatedInstall and not incompleteSpokes:
+ # Space is ok and spokes are complete, continue
+ self.close()
+ return None
- if not flags.ksprompt:
+ # cmdline mode and incomplete spokes raises and error
+ if not flags.ksprompt and incompleteSpokes:
errtxt = _("The following mandatory spokes are not completed:") +
\
"\n" + "\n".join(spoke.title for spoke in
incompleteSpokes)
log.error("CmdlineError: %s", errtxt)
--
To view this commit on github, visit
https://github.com/rhinstaller/anaconda/commit/c3b7ddedbe2d7a37522ffd2186...