From: Guillem Jover Date: Mon, 12 May 2008 05:15:16 +0000 (+0300) Subject: dpkg-gencontrol: Consider also custom Package-Type fields for warnings X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4da0de7061bc7fc5090dc1659dd525151c2cba8;p=dpkg dpkg-gencontrol: Consider also custom Package-Type fields for warnings Closes: #452273 --- diff --git a/ChangeLog b/ChangeLog index d0c92f4c..7d07beed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-05-12 Guillem Jover + + * scripts/dpkg-gencontrol.pl: Get Package-Type field value also from + custom field. + 2008-05-11 Raphael Hertzog * src/processarc.c (process_archive): While removing files that diff --git a/debian/changelog b/debian/changelog index b470dfc1..a1ca71be 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 diff --git a/scripts/dpkg-gencontrol.pl b/scripts/dpkg-gencontrol.pl index 584c9c91..160eec90 100755 --- a/scripts/dpkg-gencontrol.pl +++ b/scripts/dpkg-gencontrol.pl @@ -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'};