diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2013-07-18 13:11:46 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2013-07-18 13:11:46 +0000 |
commit | 2df2035f9515cb779c56f1a31d20884fd8cfdf3f (patch) | |
tree | 3681d1c2038f2785fc5c658d40d479242fe06d79 /scripts/metadata.pl | |
parent | 866af699fe0e2dde772742c8279ee4515e0fca43 (diff) | |
download | upstream-2df2035f9515cb779c56f1a31d20884fd8cfdf3f.tar.gz upstream-2df2035f9515cb779c56f1a31d20884fd8cfdf3f.tar.bz2 upstream-2df2035f9515cb779c56f1a31d20884fd8cfdf3f.zip |
scripts: change metadata.pm and metadata.pl to not emit "default m if ALL" Kconfig instructions for hidden packages
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37397 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'scripts/metadata.pl')
-rwxr-xr-x | scripts/metadata.pl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/metadata.pl b/scripts/metadata.pl index 41f4690f2d..f26d8fa5e5 100755 --- a/scripts/metadata.pl +++ b/scripts/metadata.pl @@ -548,8 +548,13 @@ sub print_package_config_category($) { $pkg->{hidden} and $title = ""; print "\t\t".($pkg->{tristate} ? 'tristate' : 'bool')." $title\n"; print "\t\tdefault y if DEFAULT_".$pkg->{name}."\n"; - foreach my $default (split /\s*,\s*/, $pkg->{default}) { - print "\t\tdefault $default\n"; + unless ($pkg->{hidden}) { + $pkg->{default} ||= "m if ALL"; + } + if ($pkg->{default}) { + foreach my $default (split /\s*,\s*/, $pkg->{default}) { + print "\t\tdefault $default\n"; + } } print mconf_depends($pkg->{name}, $pkg->{depends}, 0); print mconf_depends($pkg->{name}, $pkg->{mdepends}, 0); |