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
wilder
Michael Pyne 10 years ago
parent f187eaf9ff
commit 17d282376d
  1. 10
      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.

Loading…
Cancel
Save