Parcourir la 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 il y a 9 ans
Parent
commit
896a740cfe
2 fichiers modifiés avec 3 ajouts et 0 suppressions
  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
 dpkg (1.18.23) UNRELEASED; urgency=medium
 
 
+  * Handle unmatched arch-qualified virtual packages in dpkg-genbuildinfo,
+    instead of letting perl die. Closes: #849944
   * Documentation:
   * Documentation:
     - Clarify the requirements for deb-conffile(5) pathnames. Closes: #854417
     - Clarify the requirements for deb-conffile(5) pathnames. Closes: #854417
       Proposed by Dieter Adriaenssens <dieter.adriaenssens@gmail.com>.
       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.
                 # installed package of the right architecture.
                 deps_iterate($new_deps, sub {
                 deps_iterate($new_deps, sub {
                     my $dep = shift;
                     my $dep = shift;
+                    return unless defined $facts->{pkg}->{$dep->{package}};
                     $dep->{archqual} //= $architecture
                     $dep->{archqual} //= $architecture
                         if any { $_[0]->{architecture} eq $architecture }, @{$facts->{pkg}->{$dep->{package}}};
                         if any { $_[0]->{architecture} eq $architecture }, @{$facts->{pkg}->{$dep->{package}}};
                     1;
                     1;