aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/package-defaults.mk1
-rw-r--r--include/package-dumpinfo.mk1
-rwxr-xr-xscripts/metadata.pl13
-rw-r--r--scripts/metadata.pm1
4 files changed, 16 insertions, 0 deletions
diff --git a/include/package-defaults.mk b/include/package-defaults.mk
index 19f2a16045..6a345b6fb9 100644
--- a/include/package-defaults.mk
+++ b/include/package-defaults.mk
@@ -19,6 +19,7 @@ define Package/Default
CATEGORY:=Extra packages
DEPENDS:=
MDEPENDS:=
+ CONFLICTS:=
PROVIDES:=
EXTRA_DEPENDS:=
MAINTAINER:=$(PKG_MAINTAINER)
diff --git a/include/package-dumpinfo.mk b/include/package-dumpinfo.mk
index 5d1d76fee5..26c8d3199d 100644
--- a/include/package-dumpinfo.mk
+++ b/include/package-dumpinfo.mk
@@ -31,6 +31,7 @@ $(if $(MENU),Menu: $(MENU)
)$(if $(findstring $(PREREQ_CHECK),1),Prereq-Check: 1
)Version: $(VERSION)
Depends: $(call PKG_FIXUP_DEPENDS,$(1),$(DEPENDS))
+Conflicts: $(CONFLICTS)
Menu-Depends: $(MDEPENDS)
Provides: $(PROVIDES)
$(if $(VARIANT),Build-Variant: $(VARIANT)
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;