[openwrt/openwrt] metadata: do not emit broken kconfig dependency statements

LEDE Commits lede-commits at lists.infradead.org
Sun Jan 14 10:00:23 PST 2018


jow pushed a commit to openwrt/openwrt.git, branch master:
https://git.lede-project.org/a405a93fa69cf836ed628ac86b90a6a718c36bae

commit a405a93fa69cf836ed628ac86b90a6a718c36bae
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Sun Jan 14 18:46:36 2018 +0100

    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 <jo at mein.io>
---
 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 36b1160..53bb45a 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";



More information about the lede-commits mailing list