]> err.no Git - dpkg/commitdiff
dpkg-gencontrol: Consider also custom Package-Type fields for warnings
authorGuillem Jover <guillem@debian.org>
Mon, 12 May 2008 05:15:16 +0000 (08:15 +0300)
committerGuillem Jover <guillem@debian.org>
Mon, 12 May 2008 05:15:16 +0000 (08:15 +0300)
Closes: #452273
ChangeLog
debian/changelog
scripts/dpkg-gencontrol.pl

index d0c92f4c88b336331f3a9fe4b5b8ce6e529c285a..7d07beedd93d15e912ca34ce713a79d9a24cf46d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-12  Guillem Jover  <guillem@debian.org>
+
+       * scripts/dpkg-gencontrol.pl: Get Package-Type field value also from
+       custom field.
+
 2008-05-11  Raphael Hertzog  <hertzog@debian.org>
 
        * src/processarc.c (process_archive): While removing files that
index b470dfc123503e69691da89c00931ad4157de10b..a1ca71bebd8e0eb179d7b8e3f0d898657d99c8e0 100644 (file)
@@ -5,6 +5,8 @@ dpkg (1.14.19) UNRELEASED; urgency=low
     Based on a patch by Russell Coker. Closes: #474339
   * Add missing import of internerr in Dpkg::Source::Patch.pm.
     Thanks to Marco d'Itri. Closes: #479205
+  * Consider also custom Package-Type fields when printing warnings in
+    dpkg-gencontrol. Closes: #452273
 
   [ Raphael Hertzog ]
   * Add missing import of subprocerr in Dpkg::Source::Package. Thanks to Sven
index 584c9c910bb7139a4d9552a9951d50a150cf6a47..160eec9057438f71f851959674778d3bd2305666 100755 (executable)
@@ -39,7 +39,6 @@ my $stdout;
 my %remove;
 my %override;
 my $oppackage;
-my $package_type = 'deb';
 my $substvars = Dpkg::Substvars->new();
 
 
@@ -265,7 +264,8 @@ for my $f (qw(Maintainer Description Architecture)) {
 }
 $oppackage = $fields->{'Package'};
 
-$package_type = $fields->{'Package-Type'} if (defined($fields->{'Package-Type'}));
+my $package_type = $pkg->{'Package-Type'} ||
+                   tied(%$pkg)->get_custom_field('Package-Type') || 'deb';
 
 if ($package_type eq 'udeb') {
     delete $fields->{'Homepage'};