[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.2.17-15-g1228185



The following commit has been merged in the master branch:
commit 4584434e2dee868703e29ba68a3fa34e10e24277
Author: Frank Lichtenheld <djpig@debian.org>
Date:   Sat Oct 31 10:41:07 2009 +0100

    Make changelog-file more robust in terms of Perl warnings
    
    The only package I know which causes this is Perl itself, because
    it has such a weird setup that it gets lintian completly confused
    and trying to parse the upstream changelog file, which of course
    fails horribly.

diff --git a/checks/changelog-file b/checks/changelog-file
index 73f6036..4d5eb82 100644
--- a/checks/changelog-file
+++ b/checks/changelog-file
@@ -305,11 +305,11 @@ if (@entries) {
 
     # Some checks should only be done against the most recent changelog entry.
     my $entry = $entries[0];
-    if (@entries == 1 and $entry->Version =~ /-1$/) {
+    if (@entries == 1 and $entry->Version and $entry->Version =~ /-1$/) {
         tag 'new-package-should-close-itp-bug'
             unless @{ $entry->Closes };
     }
-    my $changes = $entry->Changes;
+    my $changes = $entry->Changes || '';
     while ($changes =~ /(closes\s*(?:bug)?\#?\s?\d{6,})[^\w]/ig) {
 	tag "possible-missing-colon-in-closes", "$1" if $1;
     }
@@ -326,9 +326,13 @@ if (@entries) {
     # that was already there.
     my $version;
     if ($info->native) {
-        $version = $entry->Version;
+        $version = $entry->Version || '';
     } else {
+      if( $entry->Version ){
         ($version) = (split('-', $entry->Version))[-1];
+      }else{
+	$version = '';
+      }
     }
     unless (not $info->native and $version =~ /\./) {
         if ($info->native and $version =~ /testing|(?:un)?stable/i) {
diff --git a/debian/changelog b/debian/changelog
index 792de74..5b4c1d4 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,8 @@
 lintian (2.2.18) UNRELEASED; urgency=low
 
+  * checks/changelog-file:
+    + [FL] Avoid various Perl warnings which can be caused by
+      completly broken changelog files.
   * checks/control-file{,.desc}:
     + [RA] Say to use (= ${binary:Version}) to fix weak dependencies
       between a library dev package and the shared library.  Thanks,

-- 
Debian package checker


Reply to: