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

[SCM] Debian package checker branch, master, updated. 2.2.15-14-g93d817d



The following commit has been merged in the master branch:
commit 3f6b80f917e55b194b2c5e2c2480a913ceed29a7
Author: Raphael Geissert <atomo64@gmail.com>
Date:   Mon Sep 14 17:55:48 2009 -0500

    Check for library packages recommending documentation
    
    Per the debian-devel thread -dev packages are excluded from this check,
    as are other -doc packages.

diff --git a/checks/fields b/checks/fields
index 25db836..1da5317 100644
--- a/checks/fields
+++ b/checks/fields
@@ -586,6 +586,10 @@ if (($type eq "binary") || ($type eq 'udeb')) {
 
 				tag "depends-exclusively-on-makedev", "$field",
 				    if ($field eq 'depends' && $d_pkg eq 'makedev' && @alternatives == 1);
+
+				tag "lib-recommends-documentation", "$field: $part_d_orig"
+					if ($field eq 'recommends'
+					&& $pkg =~ m/^lib.+(?!-(?:dev|docs?))$/ && $part_d_orig =~ m/-docs?$/);
 			}
 
 			for my $pkg (@seen_obsolete_packages) {
diff --git a/checks/fields.desc b/checks/fields.desc
index d7fe169..268179a 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -935,3 +935,12 @@ Severity: normal
 Certainty: possible
 Info: The VCS-* field uses an URI which doesn't match any known format.
  You might have forgotten the protocol before the hostname.
+
+Tag: lib-recommends-documentation
+Severity: normal
+Certainty: possible
+Info: The given package appears to be a library but it recommends a
+ documentation package.  Doing so is not recommended as libraries
+ usually make part of the dependencies of other packages, and this may
+ lead to users installing unwanted documentation packages (given that
+ recommends are installed by default).
diff --git a/t/tests/fields-depends-general/debian/debian/control.in b/t/tests/fields-depends-general/debian/debian/control.in
index b4f67e6..d213c6d 100644
--- a/t/tests/fields-depends-general/debian/debian/control.in
+++ b/t/tests/fields-depends-general/debian/debian/control.in
@@ -12,3 +12,13 @@ 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.
+
+Package: lib{$srcpkg}
+Architecture: {$architecture}
+Depends: $\{shlibs:Depends\}, $\{misc:Depends\}
+Recommends: debconf-doc
+Section: libs
+Description: {$description} -- fake library
+ This is a fake library 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.
diff --git a/t/tests/fields-depends-general/desc b/t/tests/fields-depends-general/desc
index d611d25..e6d1863 100644
--- a/t/tests/fields-depends-general/desc
+++ b/t/tests/fields-depends-general/desc
@@ -6,4 +6,5 @@ Test-For:
  build-depends-on-metapackage
  build-depends-on-non-build-package
  depends-on-metapackage
+ lib-recommends-documentation
 References: Debian Bug#540594
diff --git a/t/tests/fields-depends-general/tags b/t/tests/fields-depends-general/tags
index ef7cc67..6e0bba2 100644
--- a/t/tests/fields-depends-general/tags
+++ b/t/tests/fields-depends-general/tags
@@ -1,3 +1,4 @@
 E: fields-depends-general source: build-depends-on-metapackage build-depends: xorg-dev
 E: fields-depends-general source: build-depends-on-non-build-package build-depends: java-propose-classpath
 E: fields-depends-general: depends-on-metapackage depends: xorg
+W: libfields-depends-general: lib-recommends-documentation recommends: debconf-doc

-- 
Debian package checker


Reply to: