r11936 - /scripts/qa/Parse/DebControl.pm
tincho-guest at users.alioth.debian.org
tincho-guest at users.alioth.debian.org
Thu Jan 3 05:09:19 UTC 2008
Author: tincho-guest
Date: Thu Jan 3 05:09:18 2008
New Revision: 11936
URL: http://svn.debian.org/wsvn/?sc=1&rev=11936
Log:
Parse::DebControl can't understand control files that have some whitespace in
the separator lines. Since dpkg has no problem with them, this is a bug that
this commit fixes (along with some other incorrect pattern matches), and I'm
reporting it in CPAN.
Modified:
scripts/qa/Parse/DebControl.pm
Modified: scripts/qa/Parse/DebControl.pm
URL: http://svn.debian.org/wsvn/scripts/qa/Parse/DebControl.pm?rev=11936&op=diff
==============================================================================
--- scripts/qa/Parse/DebControl.pm (original)
+++ scripts/qa/Parse/DebControl.pm Thu Jan 3 05:09:18 2008
@@ -281,7 +281,7 @@
}
$linenum++;
- if($line =~ /^[^\t\s]/)
+ if($line =~ /^\S/)
{
#we have a valid key-value pair
if($line =~ /(.*?)\s*\:\s*(.*)$/)
@@ -313,7 +313,7 @@
return $structs;
}
- }elsif($line =~ /^([\t\s])(.*)/)
+ }elsif($line =~ /^(\s+)(\S.*)/)
{
#appends to previous line
@@ -328,11 +328,11 @@
$data->{$lastfield}.="\n";
}else{
my $val = $2;
- $val =~ s/[\s\t]+$//;
+ $val =~ s/\s+$//;
$data->{$lastfield}.="\n$val";
}
- }elsif($line =~ /^[\s\t]*$/){
+ }elsif($line =~ /^\s*$/){
if ($options->{verbMultiLine}
&& ($data->{$lastfield} =~ /\n/o)) {
$data->{$lastfield} .= "\n";
More information about the Pkg-perl-cvs-commits
mailing list