From 17d282376de438bacdc5730f8e89d95e3a6fce90 Mon Sep 17 00:00:00 2001 From: Michael Pyne Date: Thu, 13 Oct 2016 22:28:35 -0400 Subject: [PATCH] kde-projects: Fix a bug where some cmdline options were ignored. Though I admit that I don't yet fully understand why the bug was present, this seems to fix the use of options like --src-only. There was an actual bug here: command line options are supposed to override rc-file options by default, so the call to update the global context object's options had to happen after the rc-file options were read. Whatever *this* the problem was, it appears to have been related to either the generation of the list of potential modules, or the filtering of that list aftewards. If other problems are encountered please reopen. BUG:370534 FIXED-IN:16.11 --- modules/ksb/Application.pm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/ksb/Application.pm b/modules/ksb/Application.pm index 1b387bd..5242197 100644 --- a/modules/ksb/Application.pm +++ b/modules/ksb/Application.pm @@ -308,8 +308,6 @@ DONE croak_runtime("Error reading command-line options."); } - $cmdlineOptionsRef->{'global'} //= { }; - # To store the values we found, need to strip out the values that are # subroutines, as those are the ones we created. Alternately, place the # subs inline as an argument to the appropriate option in the @@ -359,10 +357,6 @@ sub generateModuleList my @startProgramAndArgs = @{$cmdlineGlobalOptions->{'start-program'}}; delete @{$cmdlineGlobalOptions}{qw/ignore-modules start-program/}; - # Everything else in cmdlineOptions should be OK to apply directly as a module - # or context option. - $ctx->setOption(%{$cmdlineGlobalOptions}); - # rc-file needs special handling. if (exists $cmdlineGlobalOptions->{'rc-file'} && $cmdlineGlobalOptions->{'rc-file'}) { $ctx->setRcFile($cmdlineGlobalOptions->{'rc-file'}); @@ -411,6 +405,10 @@ sub generateModuleList _executeCommandLineProgram(@startProgramAndArgs); # noreturn } + # Everything else in cmdlineOptions should be OK to apply directly as a module + # or context option. + $ctx->setOption(%{$cmdlineGlobalOptions}); + # Selecting modules or module sets would require having the KDE build # metadata available. This used to be optional, but now everything needs # it, so download it unilaterally.