diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-10-05 16:41:33 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-10-05 16:41:33 +0000 |
commit | 3ed277255c06d3bd7950ef688986f2a8f64a9e6a (patch) | |
tree | fe87b5f66a904b1c6c9c0659e4f7ba0b8be1d02d /scripts | |
parent | 742d20f881f219f4851607ee3c944ce175b9b7fc (diff) | |
download | upstream-3ed277255c06d3bd7950ef688986f2a8f64a9e6a.tar.gz upstream-3ed277255c06d3bd7950ef688986f2a8f64a9e6a.tar.bz2 upstream-3ed277255c06d3bd7950ef688986f2a8f64a9e6a.zip |
build: add support for declaring package CONFLICTS which only affect selecting built-in packages
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42770 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/metadata.pl | 13 | ||||
-rw-r--r-- | scripts/metadata.pm | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/scripts/metadata.pl b/scripts/metadata.pl index 4014613de6..366e61cb63 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"; diff --git a/scripts/metadata.pm b/scripts/metadata.pm index ab5abc0363..16acb8ea8f 100644 --- a/scripts/metadata.pm +++ b/scripts/metadata.pm @@ -113,6 +113,7 @@ sub parse_package_metadata($) { }; /^Menu-Depends: \s*(.+)\s*$/ and $pkg->{mdepends} = [ split /\s+/, $1 ]; /^Depends: \s*(.+)\s*$/ and $pkg->{depends} = [ split /\s+/, $1 ]; + /^Conflicts: \s*(.+)\s*$/ and $pkg->{conflicts} = [ split /\s+/, $1 ]; /^Hidden: \s*(.+)\s*$/ and $pkg->{hidden} = 1; /^Build-Variant: \s*([\w\-]+)\s*/ and $pkg->{variant} = $1; /^Default-Variant: .*/ and $pkg->{variant_default} = 1; |