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

[lintian] 01/01: c/fields: Tag non-canonical forms of Bioconductor homepage



This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit 25f4e72da59164c055585098b94a6740dd20e038
Author: Dylan Aïssi <bob.dybian@gmail.com>
Date:   Wed Oct 5 22:55:29 2016 +0200

    c/fields: Tag non-canonical forms of Bioconductor homepage
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 checks/fields.desc                                       | 15 +++++++++++++++
 checks/fields.pm                                         |  3 +++
 debian/changelog                                         |  3 +++
 .../debian/debian/control.in                             | 16 ++++++++++++++++
 t/tests/fields-bioconductor-homepage/desc                |  4 ++++
 t/tests/fields-bioconductor-homepage/tags                |  2 ++
 6 files changed, 43 insertions(+)

diff --git a/checks/fields.desc b/checks/fields.desc
index a8143f6..7df3dee 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -1318,3 +1318,18 @@ Info: The Homepage field for this package points to an uncanonical CRAN URL.
  not:
  .
   https://cran.r-project.org/web/packages/foo/index.html
+
+Tag: homepage-for-bioconductor-package-not-canonical
+Severity: wishlist
+Certainty: certain
+Info: The Homepage field for this package points to an uncanonical Bioconductor URL.
+ Please update to use the current canonical URL instead. The canonical URL is
+ recommended for use in publications, etc., will always redirect to current
+ release version (or devel if package is not in release yet).  For example, the
+ link for the package "foo" should be:
+ .
+ https://bioconductor.org/packages/foo/
+ .
+ not:
+ .
+ https://www.bioconductor.org/packages/(release|devel|*)/bioc/html/foo.html
diff --git a/checks/fields.pm b/checks/fields.pm
index 66b8d77..e1c5cdb 100644
--- a/checks/fields.pm
+++ b/checks/fields.pm
@@ -619,6 +619,9 @@ sub run {
         if ($homepage=~ m,/cran\.r-project\.org/web/packages/.+,){
             tag 'homepage-for-cran-package-not-canonical', $orig;
         }
+        if ($homepage=~ m,bioconductor\.org/packages/.*/bioc/html/.*\.html*$,){
+            tag 'homepage-for-bioconductor-package-not-canonical', $orig;
+        }
     } elsif (not $info->native) {
         if ($type eq 'source') {
             my $binary_has_homepage_field = 0;
diff --git a/debian/changelog b/debian/changelog
index 995b669..10065fb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,9 @@ lintian (2.5.49) UNRELEASED; urgency=medium
   * checks/debhelper.desc:
     + [CL] Drop double leading spaces in includes-maint-script-parameters
       paragraph that was causing indentation when rendered on lintian.d.o.
+  * checks/fields.{pm,desc}:
+    + [NT] Apply patch from Dylan Aïssi to tag non-canonical uses of
+      the bioconductor homepage in the Homepage field.  (Closes: #839553)
 
  -- Chris Lamb <lamby@debian.org>  Thu, 06 Oct 2016 19:04:23 +0100
 
diff --git a/t/tests/fields-bioconductor-homepage/debian/debian/control.in b/t/tests/fields-bioconductor-homepage/debian/debian/control.in
new file mode 100644
index 0000000..4e9f3f4
--- /dev/null
+++ b/t/tests/fields-bioconductor-homepage/debian/debian/control.in
@@ -0,0 +1,16 @@
+Source: {$source}
+Priority: extra
+Section: {$section}
+Maintainer: {$author}
+Standards-Version: {$standards_version}
+Build-Depends: {$build_depends}
+Homepage: https://www.bioconductor.org/packages/release/bioc/html/foo.html
+
+Package: {$source}
+Architecture: {$architecture}
+Depends: $\{shlibs:Depends\}, $\{misc:Depends\}
+Description: {$description}
+ This is a test package designed to exercise some feature or tag of
+ Lintian.  It is part of the Lintian test suite and may do very odd
+ things.  It should not be installed like a regular package.  It may
+ be an empty package.
diff --git a/t/tests/fields-bioconductor-homepage/desc b/t/tests/fields-bioconductor-homepage/desc
new file mode 100644
index 0000000..d07a5a5
--- /dev/null
+++ b/t/tests/fields-bioconductor-homepage/desc
@@ -0,0 +1,4 @@
+Testname: fields-bioconductor-homepage
+Version: 1.0
+Description: Bioconductor Homepage URLs should be canonical
+Test-For: homepage-for-bioconductor-package-not-canonical
diff --git a/t/tests/fields-bioconductor-homepage/tags b/t/tests/fields-bioconductor-homepage/tags
new file mode 100644
index 0000000..b539a90
--- /dev/null
+++ b/t/tests/fields-bioconductor-homepage/tags
@@ -0,0 +1,2 @@
+I: fields-bioconductor-homepage source: homepage-for-bioconductor-package-not-canonical https://www.bioconductor.org/packages/release/bioc/html/foo.html
+I: fields-bioconductor-homepage: homepage-for-bioconductor-package-not-canonical https://www.bioconductor.org/packages/release/bioc/html/foo.html

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: