[lintian] 01/01: Detect RData without README.source. (Closes: #815233)
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository lintian.
commit c00ed2e78e09e617b00933b4b548a37fd6c675ac
Author: Chris Lamb <lamby@debian.org>
Date: Sun May 21 09:49:08 2017 +0200
Detect RData without README.source. (Closes: #815233)
---
checks/files.desc | 11 +++++++++++
checks/files.pm | 10 ++++++++++
debian/changelog | 1 +
t/tests/files-r-data/debian/debian/install | 1 +
t/tests/files-r-data/debian/src/test.Rda | 0
t/tests/files-r-data/debian/src/test.Rdata | 0
t/tests/files-r-data/debian/src/test.rda | 0
t/tests/files-r-data/debian/src/test.rdata | 0
t/tests/files-r-data/desc | 6 ++++++
t/tests/files-r-data/tags | 4 ++++
10 files changed, 33 insertions(+)
diff --git a/checks/files.desc b/checks/files.desc
index 7113ac3..ff2f227 100644
--- a/checks/files.desc
+++ b/checks/files.desc
@@ -1741,3 +1741,14 @@ Info: The package is architecture-dependent, ships a shared library in
same package, but this package does not contain any programs.
.
Please remove the <tt>Multi-Arch: foreign</tt> stanza.
+
+Tag: r-data-without-readme-source
+Severity: important
+Certainty: certain
+Info: Many modules packaged for the R Project for Statistical Computing contain
+ data files with names as *.rda, *.Rda, *.rdata, *.Rdata, etc.
+ .
+ When such files exist, the FTP masters expect them to be explained in
+ debian/README.source, which this package is missing.
+ .
+ Please add a README.source documenting the origins of these files.
diff --git a/checks/files.pm b/checks/files.pm
index 5a696c5..74c86df 100644
--- a/checks/files.pm
+++ b/checks/files.pm
@@ -744,6 +744,16 @@ sub run {
}
}
+ # ---------------- /usr/lib/R/site-library
+ elsif ($fname =~ m,^usr/lib/R/site-library/\S,) {
+ if ( $file->is_file
+ && $file =~ m,\.(?:rda|Rda|rdata|Rdata)$,
+ && not $info->index_resolved_path('debian/README.source'))
+ {
+ tag 'r-data-without-readme-source', $file;
+ }
+ }
+
# ---------------- /usr/lib/sgml
elsif ($fname =~ m,^usr/lib/sgml/\S,) {
tag 'file-in-usr-lib-sgml', $file;
diff --git a/debian/changelog b/debian/changelog
index 0f520bb..eaf7331 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -47,6 +47,7 @@ lintian (2.5.51) UNRELEASED; urgency=medium
files that should be ignored. Thanks to Helmut Grohne for all the
research behind it. (Closes: #856857)
+ [BR] Detect symlink pointing to builddir. (Closes: #860419)
+ + [CL] Detect RData without README.source. (Closes: #815233)
* checks/gir.{desc,pm}:
+ [NT] Add check for gir packages written by Simon McVittie.
(Closes: #695345)
diff --git a/t/tests/files-r-data/debian/debian/install b/t/tests/files-r-data/debian/debian/install
new file mode 100644
index 0000000..7cd27d5
--- /dev/null
+++ b/t/tests/files-r-data/debian/debian/install
@@ -0,0 +1 @@
+src/* usr/lib/R/site-library/files-r-data
diff --git a/t/tests/files-r-data/debian/src/test.Rda b/t/tests/files-r-data/debian/src/test.Rda
new file mode 100644
index 0000000..e69de29
diff --git a/t/tests/files-r-data/debian/src/test.Rdata b/t/tests/files-r-data/debian/src/test.Rdata
new file mode 100644
index 0000000..e69de29
diff --git a/t/tests/files-r-data/debian/src/test.rda b/t/tests/files-r-data/debian/src/test.rda
new file mode 100644
index 0000000..e69de29
diff --git a/t/tests/files-r-data/debian/src/test.rdata b/t/tests/files-r-data/debian/src/test.rdata
new file mode 100644
index 0000000..e69de29
diff --git a/t/tests/files-r-data/desc b/t/tests/files-r-data/desc
new file mode 100644
index 0000000..b897784
--- /dev/null
+++ b/t/tests/files-r-data/desc
@@ -0,0 +1,6 @@
+Testname: files-r-data
+Sequence: 6000
+Version: 1.0
+Description: Checks for R statistical data files
+Test-For:
+ r-data-without-readme-source
diff --git a/t/tests/files-r-data/tags b/t/tests/files-r-data/tags
new file mode 100644
index 0000000..1a03bbd
--- /dev/null
+++ b/t/tests/files-r-data/tags
@@ -0,0 +1,4 @@
+E: files-r-data: r-data-without-readme-source usr/lib/R/site-library/files-r-data/test.Rda
+E: files-r-data: r-data-without-readme-source usr/lib/R/site-library/files-r-data/test.Rdata
+E: files-r-data: r-data-without-readme-source usr/lib/R/site-library/files-r-data/test.rda
+E: files-r-data: r-data-without-readme-source usr/lib/R/site-library/files-r-data/test.rdata
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: