Przeglądaj źródła

dpkg-checkbuilddeps: Fix bogus message on dependency parse errors

Force deps_parse() return code into a scalar, so that the empty list
does not get interpolated and ignored. Use the opportunity to reduce
nesting.

Closes: #736778
Guillem Jover 12 lat temu
rodzic
commit
5639796e64
2 zmienionych plików z 12 dodań i 8 usunięć
  1. 2 0
      debian/changelog
  2. 10 8
      scripts/dpkg-checkbuilddeps.pl

+ 2 - 0
debian/changelog

@@ -19,6 +19,8 @@ dpkg (1.17.7) UNRELEASED; urgency=low
     - Remove sequence number prefixes from test case filenames.
   * Do not generate perl warnings on nonexistent fields with
     «dpkg-parsechangelog --show».
+  * Fix bogus message on dependency parse errors in dpkg-checkbuilddeps.
+    Closes: #736778
 
   [ Updated dpkg translations ]
   * German (Sven Joachim).

+ 10 - 8
scripts/dpkg-checkbuilddeps.pl

@@ -110,16 +110,18 @@ unless (defined($bd_value) or defined($bc_value)) {
 my (@unmet, @conflicts);
 
 if ($bd_value) {
-	push @unmet, build_depends('Build-Depends/Build-Depends-Arch/Build-Depends-Indep',
-		deps_parse($bd_value, reduce_restrictions => 1, build_dep => 1,
-			   build_profiles => \@build_profiles,
-			   host_arch => $host_arch), $facts);
+    my $dep = deps_parse($bd_value, reduce_restrictions => 1,
+                         build_dep => 1, build_profiles => \@build_profiles,
+                         host_arch => $host_arch);
+    push @unmet, build_depends('Build-Depends/Build-Depends-Arch/Build-Depends-Indep',
+                               $dep, $facts);
 }
 if ($bc_value) {
-	push @conflicts, build_conflicts('Build-Conflicts/Build-Conflicts-Arch/Build-Conflicts-Indep',
-		deps_parse($bc_value, reduce_restrictions => 1, build_dep => 1,
-			   build_profiles => \@build_profiles, union => 1,
-			   host_arch => $host_arch), $facts);
+    my $dep = deps_parse($bc_value, reduce_restrictions => 1, union => 1,
+                         build_dep => 1, build_profiles => \@build_profiles,
+                         host_arch => $host_arch);
+    push @conflicts, build_conflicts('Build-Conflicts/Build-Conflicts-Arch/Build-Conflicts-Indep',
+                                     $dep, $facts);
 }
 
 if (@unmet) {