summaryrefslogtreecommitdiff
path: root/scripts/metadata.pl
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-10-05 16:41:33 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-10-05 16:41:33 +0000
commit5e4789671ae4ecd9d2eb239e865f15ef60232287 (patch)
tree8c32bb5c5e48e4a14c1b8bc97506ca1afaa03466 /scripts/metadata.pl
parent646dfde8264fc9646c30e04ca6453b519a7e6651 (diff)
downloadmtk-20170518-5e4789671ae4ecd9d2eb239e865f15ef60232287.zip
mtk-20170518-5e4789671ae4ecd9d2eb239e865f15ef60232287.tar.gz
mtk-20170518-5e4789671ae4ecd9d2eb239e865f15ef60232287.tar.bz2
build: add support for declaring package CONFLICTS which only affect selecting built-in packages
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 42770
Diffstat (limited to 'scripts/metadata.pl')
-rwxr-xr-xscripts/metadata.pl13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/metadata.pl b/scripts/metadata.pl
index 4014613..366e61c 100755
--- a/scripts/metadata.pl
+++ b/scripts/metadata.pl
@@ -522,6 +522,18 @@ sub mconf_depends {
return $res;
}
+sub mconf_conflicts {
+ my $pkgname = shift;
+ my $depends = shift;
+ my $res = "";
+
+ foreach my $depend (@$depends) {
+ next unless $package{$depend};
+ $res .= "\t\tdepends on m || (PACKAGE_$depend != y)\n";
+ }
+ return $res;
+}
+
sub print_package_config_category($) {
my $cat = shift;
my %menus;
@@ -583,6 +595,7 @@ sub print_package_config_category($) {
}
print mconf_depends($pkg->{name}, $pkg->{depends}, 0);
print mconf_depends($pkg->{name}, $pkg->{mdepends}, 0);
+ print mconf_conflicts($pkg->{name}, $pkg->{conflicts});
print "\t\thelp\n";
print $pkg->{description};
print "\n";