aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-01-11 18:22:56 +0100
committerFelix Fietkau <nbd@nbd.name>2017-01-11 18:24:39 +0100
commitcfd83555fc4f0bab18a26f6812da18e64df46ff3 (patch)
tree64acc60d0995d82544b45b577d88744a5067842d /scripts
parent90f0ca0ddca0da290b5b12c4d6c86458438edaa2 (diff)
downloadupstream-cfd83555fc4f0bab18a26f6812da18e64df46ff3.tar.gz
upstream-cfd83555fc4f0bab18a26f6812da18e64df46ff3.tar.bz2
upstream-cfd83555fc4f0bab18a26f6812da18e64df46ff3.zip
scripts/package-metadata.pl: fix overriding conditional dependencies with conditional select
Conditional dependencies use the '(!cond) || dep' syntax, whereas conditional select uses 'dep if cond'. Add an extra check to suppress emitting a conditional if an equal conditional select already exists. Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/package-metadata.pl2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
index f8f16f07fa..2da32c770e 100755
--- a/scripts/package-metadata.pl
+++ b/scripts/package-metadata.pl
@@ -215,11 +215,13 @@ sub mconf_depends {
$flags =~ /@/ or $depend = "PACKAGE_$depend";
}
}
+
if ($condition) {
if ($m =~ /select/) {
next if $depend eq $condition;
$depend = "$depend if $condition";
} else {
+ next if $dep->{"$depend if $condition"};
$depend = "!($condition) || $depend" unless $dep->{$condition} eq 'select';
}
}