Quellcode durchsuchen

parsecdata: Fix parsing of fields starting with a colon

Fix regex to determine the field name correctly if the field's value
starts with a colon.
Frank Lichtenheld vor 18 Jahren
Ursprung
Commit
9260be9dc1
3 geänderte Dateien mit 11 neuen und 2 gelöschten Zeilen
  1. 6 0
      ChangeLog
  2. 4 1
      debian/changelog
  3. 1 1
      scripts/controllib.pl

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+2007-11-29  Frank Lichtenheld  <djpig@debian.org>
+
+	* scripts/controllib.pl (parsecdata): Fix
+	regex to determine the field name correctly
+	if the field's value starts with a colon.
+
 2007-11-29  Guillem Jover  <guillem@debian.org>
 
 	* configure.ac: Bump version to 1.14.13~.

+ 4 - 1
debian/changelog

@@ -3,8 +3,11 @@ dpkg (1.14.13) UNRELEASED; urgency=low
   [ Frank Lichtenheld ]
   * Add an own manpage for Dpkg's version format. Mostly stolen
     from policy. Closes: #373003
+  * Fix control file parsing for field values starting with a colon.
+    Apparently nobody ever needed this until Vcs-Cvs came along.
+    Closes: #453364
 
- -- Guillem Jover <guillem@debian.org>  Thu, 29 Nov 2007 07:08:35 +0200
+ -- Frank Lichtenheld <djpig@debian.org>  Thu, 29 Nov 2007 23:04:33 +0100
 
 dpkg (1.14.12) unstable; urgency=low
 

+ 1 - 1
scripts/controllib.pl

@@ -281,7 +281,7 @@ sub parsecdata {
 	next if (m/^$/ and $paraborder);
 	next if (m/^#/);
 	$paraborder=0;
-        if (m/^(\S+)\s*:\s*(.*)$/) {
+        if (m/^(\S+?)\s*:\s*(.*)$/) {
 	    $cf = $1;
 	    my $v = $2;
             $cf= &capit($cf);