[SCM] Debian package checker branch, master, updated. 2.5.0-rc2-122-g12888e8
The following commit has been merged in the master branch:
commit 82aff98291a839e24703badcbada559bb255bbb9
Author: Niels Thykier <niels@thykier.net>
Date: Wed Jan 5 16:39:16 2011 +0100
Fix issues where lintian relied on $1 having a "sane" value after
a failed regex match. $N may contain the value of a previous match
in case of a failure (Thanks to periapt from #debian-perl for
helping with the debugging).
diff --git a/checks/debconf b/checks/debconf
index f1b99a9..ea1c9a7 100644
--- a/checks/debconf
+++ b/checks/debconf
@@ -282,10 +282,10 @@ foreach my $template (@templates) {
# the string "for internal use".
my ($short, $extended);
if (defined $template->{description}) {
- $template->{description} =~ m/^([^\n]*)\n(.*)$/s;
- ($short, $extended) = ($1, $2);
+ ($short, $extended) = split(/\n/, $template->{description}, 2);
unless (defined $short) {
$short = $template->{description};
+ $extended = '';
}
} else {
($short, $extended) = ('', '');
diff --git a/checks/description b/checks/description
index 08cfbd4..e113938 100644
--- a/checks/description
+++ b/checks/description
@@ -55,6 +55,8 @@ unless (defined $synopsis) {
$description = '';
}
+$description = '' unless defined($description);
+
if ($synopsis =~ m/^\s*$/) {
tag "description-synopsis-is-empty", "";
} else {
diff --git a/checks/fields b/checks/fields
index e927ea1..722849f 100644
--- a/checks/fields
+++ b/checks/fields
@@ -239,15 +239,18 @@ if (not defined $info->field('version')) {
tag "debian-revision-should-not-be-zero", "$version"
if $debian eq '-0';
my $ubuntu;
- $debian =~ /^-([^.]+)(?:\.[^.]+)?(?:\.[^.]+)?(\..*)?$/;
- my $extra = $2;
- if (defined $extra) {
+ if($debian =~ /^-([^.]+)(?:\.[^.]+)?(?:\.[^.]+)?(\..*)?$/){
+ my $extra = $2;
+ if (defined $extra) {
$debian =~ /^-([^.]+ubuntu[^.]+)(?:\.\d+){1,3}(\..*)?$/;
$ubuntu = 1;
$extra = $2;
- }
- if (not defined $1 or defined $extra) {
+ }
+ if (not defined $1 or defined $extra) {
tag "debian-revision-not-well-formed", "$version";
+ }
+ } else {
+ tag "debian-revision-not-well-formed", "$version";
}
if ($debian =~ /^-[^.-]+\.[^.-]+\./ and not $ubuntu) {
tag "binary-nmu-uses-old-version-style", "$version"
--
Debian package checker
Reply to: