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

[SCM] Debian package checker branch, master, updated. 2.5.0-rc3-15-g780777d



The following commit has been merged in the master branch:
commit 780777d87e1af443fc39abb1a1f584dc98a865a5
Author: Niels Thykier <niels@thykier.net>
Date:   Tue Apr 26 17:56:24 2011 +0200

    Properly handle changes files located directly in /

diff --git a/debian/changelog b/debian/changelog
index 213c4cc..e319b30 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,11 @@ lintian (2.5.0~rc4) UNRELEASED; urgency=low
       patch without a patch header.  Thanks to Iain Lane for suggestion
       and patch.  (Closes: #588873)
 
+  * lib/Lintian/ProcessableGroup.pm:
+    + [NT] Properly handle if the changes file is located directly in the
+      file system root (e.g. /pkg_version_arch.changes).  Thanks to
+      Trent W. Buck for the bug report.  (Closes: #624149)
+
  -- Adam D. Barratt <adam@adam-barratt.org.uk>  Sat, 23 Apr 2011 13:37:52 +0100
 
 lintian (2.5.0~rc3) unstable; urgency=low
diff --git a/lib/Lintian/ProcessableGroup.pm b/lib/Lintian/ProcessableGroup.pm
index 46ce9db..6724108 100644
--- a/lib/Lintian/ProcessableGroup.pm
+++ b/lib/Lintian/ProcessableGroup.pm
@@ -75,7 +75,15 @@ sub _init_group_from_changes {
         fail "$changes is not a valid changes file";
     $self->add_new_processable('changes', $changes);
     $cdir = $changes;
-    $cdir =~ s,(.+)/[^/]+$,$1,;
+    if ( $changes =~ m,^/+[^/]++$,o){
+        # it is "/files.changes?"
+        #  - In case you were wondering, we were told not to ask :)
+        #   See #624149
+        $cdir = '/';
+    } else {
+        # it is "<something>/files.changes"
+        $cdir =~ s,(.+)/[^/]+$,$1,;
+    }
     foreach my $line (split (/\n/o, $cinfo->{'files'}//'')) {
 	my ($file, $pkg_type);
         next unless defined $line;

-- 
Debian package checker


Reply to: