Browse Source

dpkg-genchanges: Allow binary packages not found in debian/control

We are already warning when a binary package is not found in
debian/control, there's no actual reason to then error out because they
do not have a section or priority in that debian/control file.
Guillem Jover 11 years ago
parent
commit
5bd832f538
2 changed files with 6 additions and 2 deletions
  1. 2 0
      debian/changelog
  2. 4 2
      scripts/dpkg-genchanges.pl

+ 2 - 0
debian/changelog

@@ -66,6 +66,8 @@ dpkg (1.18.0) UNRELEASED; urgency=low
   * Use the checksums files list order when building the Files field to match
     the other Checksum fields in dpkg-genchanges.
   * Skip files based on the architecture from the filename in dpkg-genchanges.
+  * Allow binary packages not found in debian/control in dpkg-genchanges,
+    which could allow injecting debug .debs for example.
 
   * Perl modules:
     - Rename and deprecate Dpkg::Gettext _g function with new g_.

+ 4 - 2
scripts/dpkg-genchanges.pl

@@ -422,8 +422,10 @@ if ($changesdescription) {
 }
 
 for my $p (keys %p2f) {
-    warning(g_('package %s listed in files list but not in control info'), $p)
-        unless defined $control->get_pkg_by_name($p);
+    if (not defined $control->get_pkg_by_name($p)) {
+        warning(g_('package %s listed in files list but not in control info'), $p);
+        next;
+    }
 
     my @f = @{$p2f{$p}};