From 005db0400a0e8721cec955ba6796f3e1e0e050de Mon Sep 17 00:00:00 2001 From: Michael Pyne Date: Tue, 2 Jul 2013 23:21:58 -0400 Subject: [PATCH] Allow for filtering out build phases in the rc-file. This needs much better documentation but I wanted to get it in the repository to allow for it to be tested. --- kdesrc-build | 8 ++++++++ modules/ksb/BuildContext.pm | 1 + 2 files changed, 9 insertions(+) diff --git a/kdesrc-build b/kdesrc-build index ece986b..4bf897e 100755 --- a/kdesrc-build +++ b/kdesrc-build @@ -614,6 +614,13 @@ EOF error (" r[b[*] module b[$module] (near line $.) should be declared as module-set to use b[$option]"); die make_exception('Config', "Option $option can only be used in module-set"); } + elsif ($option eq 'filter-out-phases') { + for my $phase (split(' ', $value)) { + $module->phases()->filterOutPhase($phase); + } + + next; # Don't fallthrough to set the option + } $module->setOption($option, $value); } @@ -938,6 +945,7 @@ sub expandXMLModules $_ = ksb::Module->new($ctx, $result->{'name'}); $_->setScmType('git'); $_->cloneOptionsFrom($moduleSet); + $_->phases()->phases($moduleSet->phases()->phases()); # Copy phases over $_->setModuleSet($moduleSet->moduleSet()); $_->setOption('repository', $repo); $_->setOption('#xml-full-path', $result->{'fullName'}); diff --git a/modules/ksb/BuildContext.pm b/modules/ksb/BuildContext.pm index 23c70da..d7af14a 100644 --- a/modules/ksb/BuildContext.pm +++ b/modules/ksb/BuildContext.pm @@ -58,6 +58,7 @@ my %defaultGlobalOptions = ( "dest-dir" => '${MODULE}', # single quotes used on purpose! "disable-agent-check" => 0, # If true we don't check on ssh-agent "do-not-compile" => "", + "filter-out-phases" => '', "git-desired-protocol" => 'git', # protocol to grab from kde-projects "git-repository-base" => {}, # Base path template for use multiple times. "http-proxy" => '', # Proxy server to use for HTTP.