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

[lintian] 04/06: Emit a warning about documentation packages that end with -docs. (Closes: #664520)



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

lamby pushed a commit to branch master
in repository lintian.

commit 7d61bab2a2d953b238e1befc44417e5b63f505a5
Author: Chris Lamb <lamby@debian.org>
Date:   Tue Jan 30 02:03:23 2018 +0000

    Emit a warning about documentation packages that end with -docs. (Closes: #664520)
---
 checks/fields.desc                                       |  9 +++++++++
 checks/fields.pm                                         |  1 +
 debian/changelog                                         |  2 ++
 .../debian/debian/control.in                             | 16 ++++++++++++++++
 t/tests/fields-unusual-doc-package-name/desc             |  6 ++++++
 t/tests/fields-unusual-doc-package-name/tags             |  1 +
 6 files changed, 35 insertions(+)

diff --git a/checks/fields.desc b/checks/fields.desc
index b59983f..5db1cbc 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -1425,3 +1425,12 @@ Info: The package specifies a binary dependecy on a "toolchain" package
  .
  If the package intentionally requires such a dependency, please add a
  Lintian override.
+
+Tag: unusual-documentation-package-name
+Severity: wishlist
+Certainty: certain
+Info: The specified package appears to be a documentation package
+ that ends with the string "-docs". It is recommended that such
+ packages use the more usual "-doc" suffix instead.
+ .
+ Please remove the superfluous trailing "s" from the package name.
diff --git a/checks/fields.pm b/checks/fields.pm
index e6a55ae..a042b08 100644
--- a/checks/fields.pm
+++ b/checks/fields.pm
@@ -254,6 +254,7 @@ sub run {
             unfold('package', \$name);
             tag 'bad-package-name' unless $name =~ /^$PKGNAME_REGEX$/i;
             tag 'package-not-lowercase' if ($name =~ /[A-Z]/);
+            tag 'unusual-documentation-package-name' if $name =~ /-docs$/;
         }
     }
 
diff --git a/debian/changelog b/debian/changelog
index 9996324..8bae08d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -31,6 +31,8 @@ lintian (2.5.73) UNRELEASED; urgency=medium
       Ramacher for the report.  (Closes: #787469)
     + [CL] Check for packages that specify binary dependencies on toolchain
       packages such as cdbs or debhelper.  (Closes: #700953)
+    + [CL] Emit a warning about documentation packages that end with -docs.
+      (Closes: #664520)
   * checks/java.{desc,pm}:
     + [CL] Check for .jar files that do not match the Debian Java policy.
       (Closes: #791552)
diff --git a/t/tests/fields-unusual-doc-package-name/debian/debian/control.in b/t/tests/fields-unusual-doc-package-name/debian/debian/control.in
new file mode 100644
index 0000000..5ee5357
--- /dev/null
+++ b/t/tests/fields-unusual-doc-package-name/debian/debian/control.in
@@ -0,0 +1,16 @@
+Source: {$source}
+Priority: optional
+Section: doc
+Maintainer: {$author}
+Standards-Version: {$standards_version}
+Build-Depends: {$build_depends}
+Rules-Requires-Root: no
+
+Package: {$source}-docs
+Architecture: all
+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-unusual-doc-package-name/desc b/t/tests/fields-unusual-doc-package-name/desc
new file mode 100644
index 0000000..b716a5e
--- /dev/null
+++ b/t/tests/fields-unusual-doc-package-name/desc
@@ -0,0 +1,6 @@
+Testname: fields-unusual-doc-package-name
+Version: 1.0
+Type: native
+Description: Check for -docs packages
+Test-For:
+ unusual-documentation-package-name
diff --git a/t/tests/fields-unusual-doc-package-name/tags b/t/tests/fields-unusual-doc-package-name/tags
new file mode 100644
index 0000000..c092cdd
--- /dev/null
+++ b/t/tests/fields-unusual-doc-package-name/tags
@@ -0,0 +1 @@
+I: fields-unusual-doc-package-name-docs: unusual-documentation-package-name

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


Reply to: