Browse Source

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 <[email protected]>
Felix Fietkau 8 years ago
parent
commit
cfd83555fc
1 changed files with 2 additions and 0 deletions
  1. 2 0
      scripts/package-metadata.pl

+ 2 - 0
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';
 			}
 		}