]> git.donarmstrong.com Git - wannabuild.git/commitdiff
filter out packages from yaml in restrict/noautobuild at needs-build time
authorAndreas Barth <aba@not.so.argh.org>
Sat, 6 Aug 2011 12:44:49 +0000 (12:44 +0000)
committerAndreas Barth <aba@not.so.argh.org>
Sat, 6 Aug 2011 12:45:15 +0000 (12:45 +0000)
bin/wanna-build

index 26456b6d540e2e311c6ee6900f3235be12a29717..1abf5dfc01911e69e30bdecfc6dc69ff30cb43ae 100755 (executable)
@@ -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;