Commit 0bc98a20 authored by Michael Pyne's avatar Michael Pyne

Rework option handling slightly since the warning which existed for a reason...

Rework option handling slightly since the warning which existed for a reason that no one ever trips up again would more often get reported for things which were perfectly acceptable.

svn path=/trunk/KDE/kdesdk/scripts/kdesvn-build; revision=826979
parent ec7f3b9f
......@@ -2723,10 +2723,15 @@ sub setup_default_modules()
whisper "Setting up to build ", join(', ', @build_list), " by default.";
for my $i (@update_list) {
if (not exists $package_opts{$i})
# Set up defaults
$package_opts{$i} = default_module_options($i);
my $options_ref = default_module_options($i);
# Apply default option only if option not already set. If the option
# is here at this point it's probably user defined on the command line
# or setup by kdesvn-build based on an option.
for my $key (keys %{$options_ref}) {
if (not exists $package_opts{$i}{$key}) {
$package_opts{$i}{$key} = $options_ref->{$key};
......@@ -2752,18 +2757,12 @@ sub parse_module
my ($fh, $module) = @_;
$module = 'global' unless $module;
# Make sure we acknowledge that we read the module name in from the
# file.
# Setup default options in case user specifies only module name to get it
# to build.
if (not defined $package_opts{$module})
$package_opts{$module} = default_module_options($module);
elsif ($module ne 'global')
# Well it looks like we have a duplicate section.
warning " y[*] Duplicate section detected for module y[b[$module].";
warning " y[*] Options will be used from the last entry where they were set.";
# Read in each option
while (<$fh>)
......@@ -3171,10 +3170,6 @@ sub set_option
# read_options() where the module-specific options are set.
if (not exists $package_opts{$module})
warning " y[*] set_option() called for undefined module y[$module]";
warning " y[*] This is probably a y[bug in kdesvn-build], please report";
warning " y[*] At";
$package_opts{$module} = default_module_options($module);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment