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

[SCM] Debian package checker branch, master, updated. 2.5.0-rc1-2-g3b9d80f



The following commit has been merged in the master branch:
commit 3b9d80fbaa99df16afe83e1b582643290807f156
Author: Niels Thykier <niels@thykier.net>
Date:   Thu Mar 10 17:14:17 2011 +0100

    Removed assumptions about changelog and usr/share in checks
    
    deb-format and huge-usr-share assumed that the changelog and
    that usr/share was populated (respectively).  If these
    assumptions were violated it would lead to undefined values
    being used in expressions.

diff --git a/checks/deb-format b/checks/deb-format
index 62edb8b..ec688d2 100644
--- a/checks/deb-format
+++ b/checks/deb-format
@@ -61,9 +61,12 @@ if ($success) {
             "second member $members[1] not control.tar.gz";
     } elsif ($members[2] eq 'data.tar.lzma') {
         # Ubuntu's archive allows lzma packages.
-        my ($entry) = $info->changelog->data;
-        my $distribution = $entry->Distribution;
-        if ($distribution =~ /$UBUNTU_REGEX/) {
+        my $distribution = '';
+        if (defined $info->changelog) {
+            my ($entry) = $info->changelog->data;
+            $distribution = $entry->Distribution;
+        }
+        if ($distribution =~ m/$UBUNTU_REGEX/) {
             $okay = 1;
         } else {
             tag 'lzma-deb-archive';
diff --git a/checks/huge-usr-share b/checks/huge-usr-share
index 0fa3d9e..ee86b2f 100644
--- a/checks/huge-usr-share
+++ b/checks/huge-usr-share
@@ -42,7 +42,7 @@ return 0 if $arch eq 'all';
 
 # Add up the space taken by the package and the space taken by just the files
 # in /usr/share.  Convert the totals to kilobytes.
-my ($size, $size_usrshare);
+my ($size, $size_usrshare) = (0, 0);
 for my $file (keys %{ $info->index }) {
     $size += $info->index->{$file}{size};
     if ($file =~ m,usr/share/,) {
diff --git a/debian/changelog b/debian/changelog
index e6f3890..8d27aa4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,11 @@ lintian (2.5.0~rc2) UNRELEASED; urgency=low
   * checks/binaries:
     + [ADB] Update binary-from-other-architecture's tests in line with the
       changes to filename output introduced in 2.5.0~rc1.  (Closes: #614906)
+  * checks/deb-format:
+    + [NT] Removed assumption that there was always a changelog in a binary
+      with a data.tar.lzma member.
+  * checks/huge-usr-share:
+    + [NT] Removed assumption that there is always files in usr/share.
 
  -- Adam D. Barratt <adam@adam-barratt.org.uk>  Fri, 25 Feb 2011 17:48:59 +0000
 

-- 
Debian package checker


Reply to: