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

Bug#884848: lintian: false positive for source-includes-file-in-files-excluded



Hi,

> lintian: false positive for source-includes-file-in-files-excluded

Indeed. The following patch *should* fix it IMHO:


  commit c807001cbbf101f74d227cde4482f535908e13a6
  Author: Chris Lamb <lamby@debian.org>
  Date:   Wed Dec 20 18:17:11 2017 +0000
  
      collection/src-orig-index: Correct reference to generated filename.
  
   collection/src-orig-index | 6 +++---
   debian/changelog          | 3 +++
   2 files changed, 6 insertions(+), 3 deletions(-)
  
  commit 5c2a7611aaccc1ef835cca058ca1fd23abe7d1ed
  Author: Chris Lamb <lamby@debian.org>
  Date:   Wed Dec 20 18:16:09 2017 +0000
  
      Use the list of files in the orig tarball rather than in the regular index to prevent false positives in the tag source-includes-file-in-files-excluded when a patch system adds files that have been removed. (Closes: #884848)
  
   checks/source-copyright.desc | 2 +-
   checks/source-copyright.pm   | 2 +-
   debian/changelog             | 5 +++++
   3 files changed, 7 insertions(+), 2 deletions(-)


.. but it fails with:

warning: collect info file-info about package idlastro failed
warning: skipping check of source package idlastro
warning: collect info file-info about package gdl-astrolib failed
warning: skipping check of binary package gdl-astrolib
Can't readlink('/tmp/temp-lintian-lab-GwZNgZ4Df3/pool/i/idlastro/idlastro_2017.08.02+dfsg-1_source-all_changes/changes'): No such file or directory at /home/lamby/git/debian/lintian/lintian/checks/changes-file.pm line 192
internal error: cannot run changes-file check on package changes:idlastro/2017.08.02+dfsg-1/source_all
warning: skipping check of changes:idlastro/2017.08.02+dfsg-1/source_all

Presumably some kind of conflict between the two collection scripts.. Hm.


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-
From c807001cbbf101f74d227cde4482f535908e13a6 Mon Sep 17 00:00:00 2001
From: Chris Lamb <lamby@debian.org>
Date: Wed, 20 Dec 2017 18:17:11 +0000
Subject: [PATCH 1/2] collection/src-orig-index: Correct reference to generated
 filename.

---
 collection/src-orig-index | 6 +++---
 debian/changelog          | 3 +++
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/collection/src-orig-index b/collection/src-orig-index
index 7799e1a2c..f4efcdd77 100755
--- a/collection/src-orig-index
+++ b/collection/src-orig-index
@@ -39,14 +39,14 @@ sub collect {
     my ($pkg, $type, $dir) = @_;
     my $info = Lintian::Collect->new($pkg, $type, $dir);
 
-    if (-f "$dir/orig-index.gz") {
-        unlink("$dir/orig-index.gz");
+    if (-f "$dir/src-orig-index.gz") {
+        unlink("$dir/src-orig-index.gz");
     }
 
     # Nothing to do for native packages where the two indices are
     # identical.
     if ($info->native) {
-        link("$dir/index.gz", "$dir/orig-index.gz");
+        link("$dir/index.gz", "$dir/src-orig-index.gz");
         return;
     }
 
diff --git a/debian/changelog b/debian/changelog
index b73da400d..7c91ad2b2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,9 @@ lintian (2.5.66) UNRELEASED; urgency=medium
       (ie. "2017-11-30 < 2017-11-30"). Thanks to Andrea Bolognani
       eof@kiyuko.org> for the report.  (Closes: #884785)
 
+  * collection/src-orig-index:
+    + [CL] Correct reference to generated filename.
+
   * data/debhelper/compat-level:
     + [MR] Bump the experimental debhelper compat level to 12.
       (Closes: #884678)
-- 
2.15.1

From 5c2a7611aaccc1ef835cca058ca1fd23abe7d1ed Mon Sep 17 00:00:00 2001
From: Chris Lamb <lamby@debian.org>
Date: Wed, 20 Dec 2017 18:16:09 +0000
Subject: [PATCH 2/2] Use the list of files in the orig tarball rather than in
 the regular index to prevent false positives in the tag
 source-includes-file-in-files-excluded when a patch system adds files that
 have been removed. (Closes: #884848)

---
 checks/source-copyright.desc | 2 +-
 checks/source-copyright.pm   | 2 +-
 debian/changelog             | 5 +++++
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/checks/source-copyright.desc b/checks/source-copyright.desc
index 33eeee666..8d47c5afb 100644
--- a/checks/source-copyright.desc
+++ b/checks/source-copyright.desc
@@ -2,7 +2,7 @@ Check-Script: source-copyright
 Author: Jakub Wilk <jwilk@debian.org>
 Abbrev: scpy
 Type: source
-Needs-Info: unpacked
+Needs-Info: unpacked, src-orig-index
 Info: This script checks if a source package conforms to policy
  with regard to copyright files.
  .
diff --git a/checks/source-copyright.pm b/checks/source-copyright.pm
index a5f66db47..352a391c0 100644
--- a/checks/source-copyright.pm
+++ b/checks/source-copyright.pm
@@ -615,7 +615,7 @@ sub get_all_files {
 
 sub check_files_excluded {
     my ($info, $excluded) = @_;
-    my @files = get_all_files($info);
+    my @files = grep { $_->is_file } $info->sorted_orig_index;
     my @wildcards = split /[\n\t ]+/, $excluded;
     for my $wildcard (@wildcards) {
         $wildcard =~ s/^\s+|\s+$//g;
diff --git a/debian/changelog b/debian/changelog
index 7c91ad2b2..212f886be 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,11 @@ lintian (2.5.66) UNRELEASED; urgency=medium
     + [CL] Warn about Python 2.x packages using ${python3:Depends} and
       Python 3.x packages using ${python:Depends}. Thanks to Mattia
       Rizzolo for the idea.  (Closes: #884676)
+  * checks/source-copyright.{desc,pm}:
+    + [CL] Use the list of files in the orig tarball rather than in the
+      regular index to prevent false positives in the
+      tag source-includes-file-in-files-excluded when a patch system adds
+      files that have been removed.  (Closes: #884848)
   * checks/standards-version.pm:
     + [CL] Avoid misleading tag descriptions when emitting valid
       timewarp-standards-version warnings if the date parts are identical
-- 
2.15.1


Reply to: