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

[lintian] 03/03: Assume that if a source package generates a binary ending in "-examples" then it does ship examples.



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

lamby pushed a commit to branch master
in repository lintian.

commit bf8cc23c7a871ffc2af11b4f0ac3c8296a0e3ecd
Author: Chris Lamb <lamby@debian.org>
Date:   Wed Feb 7 08:33:03 2018 +0000

    Assume that if a source package generates a binary ending in "-examples" then it does ship examples.
---
 checks/cruft.pm                                      | 1 +
 debian/changelog                                     | 2 ++
 t/tests/cruft-package-does-not-install-examples/desc | 1 +
 t/tests/cruft-package-does-not-install-examples/tags | 2 +-
 4 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/checks/cruft.pm b/checks/cruft.pm
index e7b610c..bfe551d 100644
--- a/checks/cruft.pm
+++ b/checks/cruft.pm
@@ -1563,6 +1563,7 @@ sub _ships_examples {
     return 1 if not @procs;
     foreach my $binpkg (@procs) {
         my $name = $binpkg->pkg_name;
+        return 1 if $name =~ m{-examples$};
         my @files = $binpkg->info->sorted_index;
         return 1 if any { m{^usr/share/doc/$name/examples/$} } @files;
     }
diff --git a/debian/changelog b/debian/changelog
index 00ef3d1..befcd05 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,8 @@ lintian (2.5.74) UNRELEASED; urgency=medium
       any binary packages in our laboratory.  (Closes: #889591)
     + [CL] Improve the description of package-does-not-install-examples to
       give more debhelper advice.
+    + [CL] Assume that if a source package generates a binary ending in
+      "-examples" then it does ship examples.
   * checks/fields.pm:
     + [CL] Avoid false positives when checking binary packages depending on
       toolchain packages by ignoring packages starting with "dh-" or ending
diff --git a/t/tests/cruft-package-does-not-install-examples/desc b/t/tests/cruft-package-does-not-install-examples/desc
index ed711ba..807cd0a 100644
--- a/t/tests/cruft-package-does-not-install-examples/desc
+++ b/t/tests/cruft-package-does-not-install-examples/desc
@@ -1,4 +1,5 @@
 Testname: cruft-package-does-not-install-examples
+Source: foo
 Version: 1.0
 Description: Detect uninstalled examples
 Options: -I --pedantic
diff --git a/t/tests/cruft-package-does-not-install-examples/tags b/t/tests/cruft-package-does-not-install-examples/tags
index 6e5a34c..9ffa39a 100644
--- a/t/tests/cruft-package-does-not-install-examples/tags
+++ b/t/tests/cruft-package-does-not-install-examples/tags
@@ -1 +1 @@
-P: cruft-package-does-not-install-examples source: package-does-not-install-examples examples/
+P: foo source: package-does-not-install-examples examples/

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


Reply to: