[lintian] 03/03: Use the list of files in the orig tarball (rather than in the regular index) to prevent false positives when checking for the source-includes-file-in-files-excluded tag when a patch system re-adds files that were removed. (Closes: #884848)
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository lintian.
commit b5eaeebead4cc0b4e218e3cdaaf201fa514144fe
Author: Chris Lamb <lamby@debian.org>
Date: Sun Dec 24 15:51:09 2017 +0000
Use the list of files in the orig tarball (rather than in the regular index) to prevent false positives when checking for the source-includes-file-in-files-excluded tag when a patch system re-adds files that were removed. (Closes: #884848)
---
checks/source-copyright.desc | 2 +-
checks/source-copyright.pm | 2 +-
debian/changelog | 4 ++++
.../source-copyright-source-files-excluded/debian/debian/copyright | 1 +
.../debian/debian/patches/0001-recreate-file.diff | 6 ++++++
.../debian/debian/patches/series | 1 +
.../debian/debian/source/format | 1 +
t/tests/source-copyright-source-files-excluded/desc | 3 ++-
.../{debian/.pc/filename => upstream/.matches} | 0
.../{debian/exclude-dir-2 => upstream/.pc}/filename | 0
.../{debian/exclude-dir => upstream/exclude-dir-2}/filename | 0
.../{debian/.pc => upstream/exclude-dir}/filename | 0
.../{debian => upstream}/exclude-dir/filename-2 | 0
.../{debian => upstream}/exclude-this | 0
.../{debian => upstream}/foolib/false-positive | 0
15 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/checks/source-copyright.desc b/checks/source-copyright.desc
index 21e70ac..2712a52 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: file-info, 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 d0ca819..2bf6a3e 100644
--- a/checks/source-copyright.pm
+++ b/checks/source-copyright.pm
@@ -640,7 +640,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 b0b0219..fb7f87f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -41,6 +41,10 @@ lintian (2.5.66) UNRELEASED; urgency=medium
* checks/source-copyright.{desc,pm}:
+ [CL] Check for Apache 2.0 packages that do not distribute their
accompanying "NOTICE" files. (Closes: #885042)
+ + [CL] Use the list of files in the orig tarball (rather than in the
+ regular index) to prevent false positives when checking for the
+ source-includes-file-in-files-excluded tag when a patch system
+ re-adds files that were removed. (Closes: #884848)
* collection/src-orig-index:
+ [CL] Correct references to generated filename.
diff --git a/t/tests/source-copyright-source-files-excluded/debian/debian/copyright b/t/tests/source-copyright-source-files-excluded/debian/debian/copyright
index 7b29b6b..805505c 100644
--- a/t/tests/source-copyright-source-files-excluded/debian/debian/copyright
+++ b/t/tests/source-copyright-source-files-excluded/debian/debian/copyright
@@ -8,6 +8,7 @@ Files-Excluded: exclude-this
lib/*
debian/*
debian/copyright
+ recreated-file
Files: *
Copyright: 2011 J. Random Hacker <j.r.hacker@example.com>
diff --git a/t/tests/source-copyright-source-files-excluded/debian/debian/patches/0001-recreate-file.diff b/t/tests/source-copyright-source-files-excluded/debian/debian/patches/0001-recreate-file.diff
new file mode 100644
index 0000000..a40e2b1
--- /dev/null
+++ b/t/tests/source-copyright-source-files-excluded/debian/debian/patches/0001-recreate-file.diff
@@ -0,0 +1,6 @@
+Re-create a file.
+
+--- /dev/null
++++ debian/recreated-file
+@@ -0,0 +1 @@
++This file was created via a patch system and should be ignored.
diff --git a/t/tests/source-copyright-source-files-excluded/debian/debian/patches/series b/t/tests/source-copyright-source-files-excluded/debian/debian/patches/series
new file mode 100644
index 0000000..ab898ca
--- /dev/null
+++ b/t/tests/source-copyright-source-files-excluded/debian/debian/patches/series
@@ -0,0 +1 @@
+0001-recreate-file.diff
diff --git a/t/tests/source-copyright-source-files-excluded/debian/debian/source/format b/t/tests/source-copyright-source-files-excluded/debian/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/t/tests/source-copyright-source-files-excluded/debian/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/t/tests/source-copyright-source-files-excluded/desc b/t/tests/source-copyright-source-files-excluded/desc
index d0287a8..f9940a7 100644
--- a/t/tests/source-copyright-source-files-excluded/desc
+++ b/t/tests/source-copyright-source-files-excluded/desc
@@ -1,5 +1,6 @@
Testname: source-copyright-source-files-excluded
-Version: 1.0
+Version: 1.0-1
+Type: non-native
Description: Test for files listed in Files-Excluded
Test-For:
source-includes-file-in-files-excluded
diff --git a/t/tests/source-copyright-source-files-excluded/debian/.pc/filename b/t/tests/source-copyright-source-files-excluded/upstream/.matches
similarity index 100%
copy from t/tests/source-copyright-source-files-excluded/debian/.pc/filename
copy to t/tests/source-copyright-source-files-excluded/upstream/.matches
diff --git a/t/tests/source-copyright-source-files-excluded/debian/exclude-dir-2/filename b/t/tests/source-copyright-source-files-excluded/upstream/.pc/filename
similarity index 100%
rename from t/tests/source-copyright-source-files-excluded/debian/exclude-dir-2/filename
rename to t/tests/source-copyright-source-files-excluded/upstream/.pc/filename
diff --git a/t/tests/source-copyright-source-files-excluded/debian/exclude-dir/filename b/t/tests/source-copyright-source-files-excluded/upstream/exclude-dir-2/filename
similarity index 100%
rename from t/tests/source-copyright-source-files-excluded/debian/exclude-dir/filename
rename to t/tests/source-copyright-source-files-excluded/upstream/exclude-dir-2/filename
diff --git a/t/tests/source-copyright-source-files-excluded/debian/.pc/filename b/t/tests/source-copyright-source-files-excluded/upstream/exclude-dir/filename
similarity index 100%
rename from t/tests/source-copyright-source-files-excluded/debian/.pc/filename
rename to t/tests/source-copyright-source-files-excluded/upstream/exclude-dir/filename
diff --git a/t/tests/source-copyright-source-files-excluded/debian/exclude-dir/filename-2 b/t/tests/source-copyright-source-files-excluded/upstream/exclude-dir/filename-2
similarity index 100%
rename from t/tests/source-copyright-source-files-excluded/debian/exclude-dir/filename-2
rename to t/tests/source-copyright-source-files-excluded/upstream/exclude-dir/filename-2
diff --git a/t/tests/source-copyright-source-files-excluded/debian/exclude-this b/t/tests/source-copyright-source-files-excluded/upstream/exclude-this
similarity index 100%
rename from t/tests/source-copyright-source-files-excluded/debian/exclude-this
rename to t/tests/source-copyright-source-files-excluded/upstream/exclude-this
diff --git a/t/tests/source-copyright-source-files-excluded/debian/foolib/false-positive b/t/tests/source-copyright-source-files-excluded/upstream/foolib/false-positive
similarity index 100%
rename from t/tests/source-copyright-source-files-excluded/debian/foolib/false-positive
rename to t/tests/source-copyright-source-files-excluded/upstream/foolib/false-positive
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: