scrips/metadata.pl: fix broken targets with subtargets being selectable
authorjogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 22 Oct 2012 22:16:19 +0000 (22:16 +0000)
committerjogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 22 Oct 2012 22:16:19 +0000 (22:16 +0000)
r26926 moved all target features to subtargets if present, which had the
side effect that broken targets are available for selection, just without
any available subtargets (since they are still marked as broken).

Fix this by explicitly letting the top level target also depend on broken.

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33892 3c298f89-4303-0410-b956-a3cf2f4a3e73

scripts/metadata.pl

index 7afc3889270158df98afbc88875f16081b5780ea..b04cd8cc3d943c470a952b7bce79b42d9b36caef 100755 (executable)
@@ -233,6 +233,7 @@ EOF
        }
        if (@{$target->{subtargets}} > 0) {
                $confstr .= "\tselect HAS_SUBTARGETS\n";
+               grep { /broken/ } @{$target->{features}} and $confstr .= "\tdepends BROKEN\n";
        } else {
                $confstr .= $features;
        }