From: Jo-Philipp Wich Date: Sun, 14 Jan 2018 17:46:36 +0000 (+0100) Subject: metadata: do not emit broken kconfig dependency statements X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a405a93fa69cf836ed628ac86b90a6a718c36bae;p=openwrt%2Fstaging%2Fblocktrron.git 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 --- 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";