Re: [PATCH 1/2] Skip the askmethod dialog on boot.iso+method= (#611154).

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

 



Ack.

On Tue, 27 Jul 2010, Chris Lumens wrote:

The previous method selection patch had the unfortunate side effect of
causing the method selection screen to still appear for kickstart and
boot.iso installs when method=/repo= was provided.  This patch just tweaks
the conditionals a bit to correct that, plus add some debugging to make
this easier to debug in the future.
---
loader/loader.c |   17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/loader/loader.c b/loader/loader.c
index 2ebe2a2..b1e73f5 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -1261,10 +1261,14 @@ static char *doLoaderMain(struct loaderData_s *loaderData,
                sleep(3);
                newtPopWindow();
            }
+            else
+                logMessage(DEBUG, "This appears to be a boot.iso.");

            skipLangKbd = 1;
            flags |= LOADER_FLAGS_NOPASS;
-        } else if (!loaderData->stage2Data && loaderData->instRepo) {
+        }
+
+        if (!loaderData->stage2Data && loaderData->instRepo) {
            /* If no CD/DVD with a stage2 image was found and we were given a
             * repo=/method= parameter, try to piece together a valid setting
             * for the stage2= parameter based on that.
@@ -1289,13 +1293,15 @@ static char *doLoaderMain(struct loaderData_s *loaderData,
            if (loaderData->method != -1) {
                skipMethodDialog = 1;
            }
-        } else if (loaderData->stage2Data) {
+        } else if (!url && loaderData->stage2Data) {
+            logMessage(DEBUG, "Have stage2 location, so skipping method dialog");
            skipMethodDialog = 1;
        }
    } else {
        /* Needed because they have already been set when parsing cmdline.
         * (Leaks a little.)
         */
+        logMessage(DEBUG, "askmethod parameter given");
        loaderData->method = -1;
        loaderData->stage2Data = NULL;
    }
@@ -1361,15 +1367,18 @@ static char *doLoaderMain(struct loaderData_s *loaderData,
            }

            case STEP_METHOD: {
-                if (loaderData->method != -1)
+                logMessage(INFO, "starting STEP_METHOD");
+                if (loaderData->method != -1) {
+                    logMessage(DEBUG, "loaderData->method is set, adding skipMethodDialog");
                    skipMethodDialog = 1;
-                else if (FL_CMDLINE(flags)) {
+                } else if (FL_CMDLINE(flags)) {
                    fprintf(stderr, "No method given for cmdline mode, aborting\n");
                    doExit(EXIT_FAILURE);
                }

                /* If we already found a stage2 image, skip the prompt. */
                if (skipMethodDialog) {
+                    logMessage(DEBUG, "skipMethodDialog is set");
                    if (dir == 1)
                        rc = 1;
                    else


--
David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

_______________________________________________
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