summaryrefslogtreecommitdiff
path: root/scripts/metadata.pl
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2015-02-09 12:09:43 +0000
committerJohn Crispin <john@openwrt.org>2015-02-09 12:09:43 +0000
commite2684c218d0bb5f132eb1c9b80cdafafd828fe21 (patch)
tree4c77faf6b78c540434dc0edf476bcdfa2e050cf2 /scripts/metadata.pl
parentb7cf4cc61300e6e6023ae6a494991e5c57f90656 (diff)
downloadmtk-20170518-e2684c218d0bb5f132eb1c9b80cdafafd828fe21.zip
mtk-20170518-e2684c218d0bb5f132eb1c9b80cdafafd828fe21.tar.gz
mtk-20170518-e2684c218d0bb5f132eb1c9b80cdafafd828fe21.tar.bz2
build: propagate override information to .config file
With this change, override information is now parsed from the metadata and put in the %packages hash. A new hash - %overrides - is created and exported, to be used during the .config-package.in generation. If an override is detected, a new option CONFIG_OVERRIDE_PKGS will be created in the .config, and will contain a space-separated list of all the overridden packages. Signed-off-by: Mathieu Olivari <mathieu@qca.qualcomm.com> SVN-Revision: 44336
Diffstat (limited to 'scripts/metadata.pl')
-rwxr-xr-xscripts/metadata.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/metadata.pl b/scripts/metadata.pl
index ea437f5..abf8248 100755
--- a/scripts/metadata.pl
+++ b/scripts/metadata.pl
@@ -679,6 +679,13 @@ EOF
print "endmenu\n\n";
}
+sub print_package_overrides() {
+ keys %overrides > 0 or return;
+ print "\tconfig OVERRIDE_PKGS\n";
+ print "\t\tstring\n";
+ print "\t\tdefault \"".join(" ", keys %overrides)."\"\n\n";
+}
+
sub gen_package_config() {
parse_package_metadata($ARGV[0]) or exit 1;
print "menuconfig IMAGEOPT\n\tbool \"Image configuration\"\n\tdefault n\n";
@@ -704,6 +711,7 @@ EOF
foreach my $cat (sort {uc($a) cmp uc($b)} keys %category) {
print_package_config_category $cat;
}
+ print_package_overrides();
}
sub get_conditional_dep($$) {