[master/f21] Allow kickstart with no method (#972265)

Brian C. Lane bcl at redhat.com
Fri Oct 10 22:59:03 UTC 2014


If the kickstart has no method allow Anaconda to fallback to the closest
mirror or DVD.

Also change the source spoke to be complete for an automated install if
it has a baserepo, not a baserepo and a method. If it has a baserepo
then that means that the method setup, whatever it is, is ok.
---
 anaconda                           | 5 ++++-
 pyanaconda/ui/gui/spokes/source.py | 2 +-
 pyanaconda/ui/tui/spokes/source.py | 2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/anaconda b/anaconda
index 39c8220..c2a3435 100755
--- a/anaconda
+++ b/anaconda
@@ -1317,8 +1317,11 @@ if __name__ == "__main__":
                                      args=(ksdata.timezone, anaconda.storage, anaconda.bootloader)))
 
     threadMgr.add(AnacondaThread(name=constants.THREAD_WAIT_FOR_CONNECTING_NM, target=wait_for_connecting_NM_thread, args=(ksdata,)))
+
+    # Fallback to default for interactive or for a kickstart with no installation method.
+    fallback = not (flags.automatedInstall and ksdata.method.method)
     payloadMgr.restartThread(anaconda.storage, ksdata, anaconda.payload, anaconda.instClass,
-            fallback=not flags.automatedInstall)
+            fallback=fallback)
 
     # check if geolocation should be enabled for this type of installation
     use_geolocation = True
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index a92160b..67e968c 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -507,7 +507,7 @@ class SourceSpoke(NormalSpoke, GUISpokeInputCheckHandler):
         """ WARNING: This can be called before _initialize is done, make sure that it
             doesn't access things that are not setup (eg. payload.*) until it is ready
         """
-        if flags.automatedInstall and self.ready and (not self.data.method.method or not self.payload.baseRepo):
+        if flags.automatedInstall and self.ready and not self.payload.baseRepo:
             return False
         else:
             return not self._error and self.ready and (self.data.method.method or self.payload.baseRepo)
diff --git a/pyanaconda/ui/tui/spokes/source.py b/pyanaconda/ui/tui/spokes/source.py
index 72b774e..7f0c79f 100644
--- a/pyanaconda/ui/tui/spokes/source.py
+++ b/pyanaconda/ui/tui/spokes/source.py
@@ -131,7 +131,7 @@ class SourceSpoke(EditTUISpoke, SourceSwitchHandler):
 
     @property
     def completed(self):
-        if flags.automatedInstall and self.ready and (not self.data.method.method or not self.payload.baseRepo):
+        if flags.automatedInstall and self.ready and not self.payload.baseRepo:
             return False
         else:
             return not self.errors and self.ready and (self.data.method.method or self.payload.baseRepo)
-- 
1.9.3



More information about the anaconda-patches mailing list