From a405a93fa69cf836ed628ac86b90a6a718c36bae Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 14 Jan 2018 18:46:36 +0100 Subject: [PATCH] metadata: do not emit broken kconfig dependency statements Prevent emitting broken dependency statements when resolving references to non existing packages to an empty provider list. Fixes: 47d6b05ad3 ("metadata: always resolve dependencies through provides list") Signed-off-by: Jo-Philipp Wich --- scripts/package-metadata.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index 36b1160d8c..53bb45a62c 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -209,7 +209,7 @@ sub mconf_depends { $flags =~ /@/ or $depend = "PACKAGE_$depend"; } else { my $vdep = $vpackage{$depend}; - if ($vdep) { + if ($vdep && @$vdep > 0) { $depend = join("||", map { "PACKAGE_".$_->{name} } @$vdep); } else { $flags =~ /@/ or $depend = "PACKAGE_$depend"; -- 2.25.1