From: Jo-Philipp Wich Date: Sat, 15 Jun 2019 11:17:04 +0000 (+0200) Subject: metadata: ensure one dependency provider to be y if a package is y X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=refs%2Fheads%2Fmetadata-fix-provides-built-in;p=openwrt%2Fstaging%2Fjogo.git metadata: ensure one dependency provider to be y if a package is y When there are multiple packages providing a meta-package, it is possible to to create a config where a package is selected as =y, but all of its dependency providers are just selected as =m. This is due to the selection statement being just config PACKAGE_foo SELECT PACKAGE_bar if !PACKAGE_baz which is already fulfilled by PACKAGE_bar=m. Fix this by properly comparing the selection states: config PACKAGE_foo SELECT PACKAGE_bar if PACKAGE_baz [jonas.gorski@gmail.com: remove negation for better readability] Signed-off-by: Jonas Gorski --- diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index 76b09a56eb..eeb2c83a9b 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -191,9 +191,9 @@ sub mconf_depends { $depend = shift @vdeps; if (@vdeps > 1) { - $condition = ($condition ? "$condition && " : '') . '!('.join("||", map { "PACKAGE_".$_ } @vdeps).')'; + $condition = ($condition ? "$condition && " : '') . ''.join("&&", map { "PACKAGE_$_ 0) { - $condition = ($condition ? "$condition && " : '') . '!PACKAGE_'.$vdeps[0]; + $condition = ($condition ? "$condition && " : '') . "PACKAGE_${vdeps[0]}