The following commit has been merged in the master branch:
commit 293c6541c334b422139fa48c4e12070f6f095868
Author: Raphaël Hertzog <[email protected]>
Date:   Thu Sep 17 20:28:11 2009 +0200

    dpkg-genchanges, dpkg-gencontrol: do not hardcode the field output order
    
    The right field output order is automatically set based on the type
    of the Dpkg::Control object used.

diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl
index 35523d4..f3b4c68 100755
--- a/scripts/dpkg-genchanges.pl
+++ b/scripts/dpkg-genchanges.pl
@@ -23,11 +23,6 @@ use Dpkg::Vendor qw(run_vendor_hook);
 
 textdomain("dpkg-dev");
 
-my @changes_fields = qw(Format Date Source Binary Architecture Version
-                        Distribution Urgency Maintainer Changed-By
-                        Description Closes Changes Checksums-Md5
-                        Checksums-Sha1 Checksums-Sha256 Files);
-
 my $controlfile = 'debian/control';
 my $changelogfile = 'debian/changelog';
 my $changelogformat;
@@ -541,7 +536,6 @@ for my $f (keys %remove) {
     delete $fields->{$f};
 }
 
-$fields->set_output_order(@changes_fields);
 run_vendor_hook('before-changes-creation', $fields);
 $fields->output(\*STDOUT); # Note: no substitution of variables
 
diff --git a/scripts/dpkg-gencontrol.pl b/scripts/dpkg-gencontrol.pl
index 8a37153..bc3edc9 100755
--- a/scripts/dpkg-gencontrol.pl
+++ b/scripts/dpkg-gencontrol.pl
@@ -10,9 +10,9 @@ use Dpkg::Gettext;
 use Dpkg::ErrorHandling;
 use Dpkg::Arch qw(get_host_arch debarch_eq debarch_is);
 use Dpkg::Deps;
-use Dpkg::Fields qw(:list unknown);
 use Dpkg::Control;
 use Dpkg::Control::Info;
+use Dpkg::Control::Fields;
 use Dpkg::Substvars;
 use Dpkg::Vars;
 use Dpkg::Changelog qw(parse_changelog);
@@ -20,11 +20,6 @@ use Dpkg::Changelog qw(parse_changelog);
 textdomain("dpkg-dev");
 
 my @pkg_dep_fields = field_list_pkg_dep();
-my @control_fields = (qw(Package Package-Type Source Version Kernel-Version
-                         Architecture Subarchitecture Installer-Menu-Item
-                         Essential Origin Bugs Maintainer Installed-Size),
-                      @pkg_dep_fields,
-                      qw(Section Priority Multi-Arch Homepage Description 
Tag));
 
 my $controlfile = 'debian/control';
 my $changelogfile = 'debian/changelog';
@@ -364,7 +359,6 @@ if (!$stdout) {
     $fh_output = \*STDOUT;
 }
 
-$fields->set_output_order(@control_fields);
 $fields->apply_substvars($substvars);
 $fields->output($fh_output);
 

-- 
dpkg's main repository


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

Reply via email to