diff options
author | Jonas Gorski <jonas.gorski@gmail.com> | 2019-06-15 15:04:53 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-06-20 14:18:25 +0200 |
commit | 1fd50531cac9c41334d8f57e2dbc1f50c3572445 (patch) | |
tree | 97d46eec85309cdc3c9eff9b58cfb117aeb928d2 /scripts/package-metadata.pl | |
parent | 74739c4228f3bd0aa757165c67c53016c3deb544 (diff) | |
download | upstream-1fd50531cac9c41334d8f57e2dbc1f50c3572445.tar.gz upstream-1fd50531cac9c41334d8f57e2dbc1f50c3572445.tar.bz2 upstream-1fd50531cac9c41334d8f57e2dbc1f50c3572445.zip |
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<PACKAGE_foo
Also invert the select conditions to improve readability.
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
[slightly reword commit message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'scripts/package-metadata.pl')
-rwxr-xr-x | scripts/package-metadata.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index 76b09a56eb..27215f5e57 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_$_<PACKAGE_$pkgname" } @vdeps); } elsif (@vdeps > 0) { - $condition = ($condition ? "$condition && " : '') . '!PACKAGE_'.$vdeps[0]; + $condition = ($condition ? "$condition && " : '') . "PACKAGE_${vdeps[0]}<PACKAGE_$pkgname"; } } |