From: Andreas Barth Date: Sat, 6 Aug 2011 12:44:49 +0000 (+0000) Subject: filter out packages from yaml in restrict/noautobuild at needs-build time X-Git-Url: https://git.donarmstrong.com/?p=wannabuild.git;a=commitdiff_plain;h=421ee3642f21bce80b4318f6d5d027dc3453e116 filter out packages from yaml in restrict/noautobuild at needs-build time --- diff --git a/bin/wanna-build b/bin/wanna-build index 26456b6..1abf5df 100755 --- a/bin/wanna-build +++ b/bin/wanna-build @@ -1185,6 +1185,14 @@ sub list_packages { @list = grep { my $i = $_->{'component'}; grep { $i eq $_ } split /[, ]+/, $yamlmap->{"restrict"}{'component'} } @list; # extra depends / conflicts only from api 1 on @list = grep { !$_->{'extra_depends'} and !$_->{'extra_conflicts'} } @list if $api < 1 ; + # filter out packages for needs-build in noautobuild state - same could exist for weaknoautobuild if buildds would tell us what they do + if (($state eq 'needs-build') && ($yamlmap->{"restrict"}) && ($yamlmap->{"restrict"}{"noautobuild"})) { + foreach my $key (@{$yamlmap->{"restrict"}{"noautobuild"}}) { + foreach my $k (keys %$key) { + @list = grep { $_->{'package'} ne $k } @list; + } + } + } # first adjust ownprintformat, then set printformat accordingly $printformat ||= $yamlmap->{"format"}{$ownprintformat} if $ownprintformat;