scripts/package-metadata.pl: fix generation of dependencies on virtual packages
authorMatthias Schiffer <mschiffer@universe-factory.net>
Fri, 23 Sep 2016 21:17:09 +0000 (23:17 +0200)
committerMatthias Schiffer <mschiffer@universe-factory.net>
Fri, 23 Sep 2016 21:17:09 +0000 (23:17 +0200)
Dependencies on purely virtual packages (satisfied by PROVIDES) that were
not using "selects" ("+" flag) would be prepended with the prefix
"PACKAGE_" twice, breaking the first alternative.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
scripts/package-metadata.pl

index 44494efd28139de66aeac71bb008ac0f99f51b8c..09aed96c2be6572a1871d6c40f3ea24ece195084 100755 (executable)
@@ -193,12 +193,15 @@ sub mconf_depends {
 
                        $m = "select";
                        next if $only_dep;
+
+                       $flags =~ /@/ or $depend = "PACKAGE_$depend";
                } else {
                        if ($vdep = $package{$depend}->{vdepends}) {
                                $depend = join("||", map { "PACKAGE_".$_ } @$vdep);
+                       } else {
+                               $flags =~ /@/ or $depend = "PACKAGE_$depend";
                        }
                }
-               $flags =~ /@/ or $depend = "PACKAGE_$depend";
                if ($condition) {
                        if ($m =~ /select/) {
                                next if $depend eq $condition;