The following commit has been merged in the lenny branch:
commit b4da0de7061bc7fc5090dc1659dd525151c2cba8
Author: Guillem Jover <[EMAIL PROTECTED]>
Date:   Mon May 12 08:15:16 2008 +0300

    dpkg-gencontrol: Consider also custom Package-Type fields for warnings
    
    Closes: #452273

diff --git a/ChangeLog b/ChangeLog
index d0c92f4..7d07bee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-12  Guillem Jover  <[EMAIL PROTECTED]>
+
+       * scripts/dpkg-gencontrol.pl: Get Package-Type field value also from
+       custom field.
+
 2008-05-11  Raphael Hertzog  <[EMAIL PROTECTED]>
 
        * src/processarc.c (process_archive): While removing files that
diff --git a/debian/changelog b/debian/changelog
index b470dfc..a1ca71b 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 584c9c9..160eec9 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'};

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to