Răsfoiți Sursa

scripts/package-metadata.pl: fix handling of virtual (PROVIDES) depends

Currently the code emitting dependencies for provide candidates is overwriting
the specification calculated by the previous conditional dependency handling
code, rendering dependencies on virtual PROVIDES packages in conjunction with
conditional dependencies unusable.

Instead of overwriting, append the PROVIDES dependency spec in order to fix
using DEPENDS on virtual provider packages in conjunction with conditions.

Signed-off-by: Jo-Philipp Wich <[email protected]>
Jo-Philipp Wich 9 ani în urmă
părinte
comite
f64360c7ca
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      scripts/package-metadata.pl

+ 2 - 2
scripts/package-metadata.pl

@@ -179,9 +179,9 @@ sub mconf_depends {
 				my @vdeps = @$vdep;
 				$depend = shift @vdeps;
 				if (@vdeps > 1) {
-					$condition = '!('.join("||", map { "PACKAGE_".$_ } @vdeps).')';
+					$condition = ($condition ? "$condition && " : '') . '!('.join("||", map { "PACKAGE_".$_ } @vdeps).')';
 				} elsif (@vdeps > 0) {
-					$condition = '!PACKAGE_'.$vdeps[0];
+					$condition = ($condition ? "$condition && " : '') . '!PACKAGE_'.$vdeps[0];
 				}
 			}