[debhelper-devel] [debhelper] 01/01: getpackages(): Make parsing of paragraphs field order-insensitive

Niels Thykier nthykier at moszumanska.debian.org
Sat Feb 18 19:38:21 UTC 2017


This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository debhelper.

commit 83b932bd320a1a626d18a84555e6fce447a8d530
Author: Niels Thykier <niels at thykier.net>
Date:   Sat Feb 18 19:37:16 2017 +0000

    getpackages(): Make parsing of paragraphs field order-insensitive
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 Debian/Debhelper/Dh_Lib.pm | 4 ++--
 debian/changelog           | 6 ++++++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index 3c44238..8f043ce 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -975,7 +975,6 @@ sub getpackages {
 			else {
 				error("debian/control has a duplicate entry for $package");
 			}
-			$package_type="deb";
 			$included_in_build_profile=1;
 		}
 		if (/^Section:\s(.*)\s*$/i) {
@@ -1009,7 +1008,7 @@ sub getpackages {
 
 		if (!$_ or eof) { # end of stanza.
 			if ($package) {
-				$package_types{$package}=$package_type;
+				$package_types{$package}=$package_type // 'deb';
 				$package_arches{$package}=$arch;
 				$package_multiarches{$package} = $multiarch;
 				$package_sections{$package} = $section || $source_section;
@@ -1028,6 +1027,7 @@ sub getpackages {
 				$source_section = $section;
 			}
 			$package='';
+			$package_type=undef;
 			$arch='';
 			$section='';
 		}
diff --git a/debian/changelog b/debian/changelog
index 295a82b..2078897 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,16 @@
 debhelper (10.2.6) UNRELEASED; urgency=medium
 
+  [ Helmut Grohne ]
   * Supply PKG_CONFIG for cross compilation with the makefile buildsystem.
     (Closes: #853881)
   * Disable stripping during dh_auto_* in makefile buildsystem in compat 11.
     (Closes: #844077)
 
+  [ Niels Thykier ]
+  * Dh_Lib.pm: Make getpackages() produce the correct result independently
+    of the order of the fields in a given paragraph of debian/control.
+    (Closes: #847138)
+
  -- Helmut Grohne <helmut at subdivi.de>  Sat, 18 Feb 2017 17:49:08 +0000
 
 debhelper (10.2.5) unstable; urgency=medium

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git




More information about the debhelper-devel mailing list