[debhelper-devel] [debhelper] 01/02: Parse control file fields case-insensitively

brlink at debian.org brlink at debian.org
Thu Jan 1 20:39:21 UTC 2015


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

brlink pushed a commit to branch master
in repository debhelper.

commit d9c6de300ef5237399e9e9d28a5589e2ef2ac73c
Author: Guillem Jover <guillem at debian.org>
Date:   Thu Dec 11 02:31:11 2014 +0100

    Parse control file fields case-insensitively
    
    Closes: #772129
---
 Debian/Debhelper/Dh_Lib.pm | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index 791774e..3b94a05 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -771,7 +771,7 @@ sub sourcepackage {
 	while (<CONTROL>) {
 		chomp;
 		s/\s+$//;
-		if (/^Source:\s*(.*)/) {
+		if (/^Source:\s*(.*)/i) {
 			close CONTROL;
 			return $1;
 		}
@@ -813,7 +813,7 @@ sub getpackages {
 	while (<CONTROL>) {
 		chomp;
 		s/\s+$//;
-		if (/^Package:\s*(.*)/) {
+		if (/^Package:\s*(.*)/i) {
 			$package=$1;
 			# Detect duplicate package names in the same control file.
 			if (! $seen{$package}) {
@@ -825,16 +825,16 @@ sub getpackages {
 			$package_type="deb";
 			$included_in_build_profile=1;
 		}
-		if (/^Architecture:\s*(.*)/) {
+		if (/^Architecture:\s*(.*)/i) {
 			$arch=$1;
 		}
-		if (/^(?:X[BC]*-)?Package-Type:\s*(.*)/) {
+		if (/^(?:X[BC]*-)?Package-Type:\s*(.*)/i) {
 			$package_type=$1;
 		}
 		# rely on libdpkg-perl providing the parsing functions because
 		# if we work on a package with a Build-Profiles field, then a
 		# high enough version of dpkg-dev is needed anyways
-		if (/^Build-Profiles:\s*(.*)/) {
+		if (/^Build-Profiles:\s*(.*)/i) {
 		        my $build_profiles=$1;
 			eval {
 				require Dpkg::BuildProfiles;

-- 
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