Browse Source

dpkg-genbuildinfo: Handle unmatched virtual arch-qualified packages

The dependency traversal code is currently broken, and this mostly
papers over the issue. Properly fixing this involves changes all over
the place, which would be too intrusive for this series.

We should handle this gracefully, instead of letting perl die.

Closes: #849944
Guillem Jover 7 years ago
parent
commit
896a740cfe
2 changed files with 3 additions and 0 deletions
  1. 2 0
      debian/changelog
  2. 1 0
      scripts/dpkg-genbuildinfo.pl

+ 2 - 0
debian/changelog

@@ -1,5 +1,7 @@
 dpkg (1.18.23) UNRELEASED; urgency=medium
 
+  * Handle unmatched arch-qualified virtual packages in dpkg-genbuildinfo,
+    instead of letting perl die. Closes: #849944
   * Documentation:
     - Clarify the requirements for deb-conffile(5) pathnames. Closes: #854417
       Proposed by Dieter Adriaenssens <dieter.adriaenssens@gmail.com>.

+ 1 - 0
scripts/dpkg-genbuildinfo.pl

@@ -213,6 +213,7 @@ sub collect_installed_builddeps {
                 # installed package of the right architecture.
                 deps_iterate($new_deps, sub {
                     my $dep = shift;
+                    return unless defined $facts->{pkg}->{$dep->{package}};
                     $dep->{archqual} //= $architecture
                         if any { $_[0]->{architecture} eq $architecture }, @{$facts->{pkg}->{$dep->{package}}};
                     1;