kde-projects: Don't croak on use-modules non-module entries on cmdline

E.g. Running "kdesrc-build kdeedu" with a kdesrc-buildrc containing

module-set
    repository kde-projects
    use-modules kdeedu
end module-set

would give a runtime exception, even though kdeedu expands to a valid
set of modules. The code here is too restrictive, looking for actual
specific *modules* (i.e. assuming that the use-modules entry specifies a
specific module instead of an implicit wildcard entry).

BUG:339965
FIXED-IN:1.16
wilder
Michael Pyne 11 years ago
parent 1cc6f87971
commit 3090298e44
  1. 16
      modules/ksb/Application.pm

@ -420,12 +420,20 @@ sub _resolveSelectorsIntoModules
} @{$expandedModuleSets{$neededModuleSet}};
if (!$selector) {
croak_internal("Didn't select a module that was here earlier in the code path. Please report a bug.");
# If the selector doesn't match a name exactly it probably matches
# a wildcard prefix. e.g. 'kdeedu' as a selector would pull in all kdeedu/*
# modules, but kdeedu is not a module-name itself anymore. We'd want to
# have kdesrc-build simply treat this as a module-set, but we can't use the
# expanded module list... instead we'll return the module set reference and
# it will be expanded later.
$selector = $neededModuleSet;
}
$lookupTable{$selectorName} = $selector;
$selector->setOption('#selected-by',
'partial-expansion-' . $neededModuleSet->name());
# Can't use setOption since this might be a module-set
my $selectedReason = 'partial-expansion-' . $neededModuleSet->name();
$selector->{options}->{'#selected-by'} = $selectedReason;
$lookupTable{$selectorName} = $neededModuleSet;
}
elsif (ref $selector && $selector->isa('ksb::Module')) {
# We couldn't find anything better than what we were provided,

Loading…
Cancel
Save