Package: lintian Version: 2.5.21 Severity: wishlist Hello,
When dealing with a maven plugin (lib*maven*plugin), jar can be installed in other place than /usr/shave/java. In this case the package is called lib*maven*plugin, we disable the warning. Patch attached! Thanks Sylvestre
>From 4c4f28d8da0297609b02f3b7416f1cc1d0ced6aa Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru <sylves...@debian.org> Date: Wed, 2 Apr 2014 17:06:08 +0200 Subject: [PATCH] *[SL] Do not trigger a warning when a jar is not in /usr/share/java and the package name matches lib.*maven.*plugin.*java --- checks/java.pm | 4 +++- debian/changelog | 2 ++ t/tests/java-jars/debian/debian/control.in | 9 +++++++++ .../java-jars/debian/debian/libtest-maven-plugin-java.install | 1 + 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 t/tests/java-jars/debian/debian/libtest-maven-plugin-java.install diff --git a/checks/java.pm b/checks/java.pm index 95eed1d..4ed60cd 100644 --- a/checks/java.pm +++ b/checks/java.pm @@ -222,7 +222,9 @@ sub run { tag 'missing-classpath', join(', ', @java_lib_depends); } - if (!$has_public_jars && $pkg =~ /^lib[^\s,]+-java$/) { + if (!$has_public_jars && $pkg =~ /^lib[^\s,]+-java$/ && $pkg !~ /^lib.*maven.*plugin.*/) { + # Skip this warning if the package name indicates that it is a maven plugin. + # Skip this if it installs a symlink in usr/share/java return if any { m@^usr/share/java/[^/]+\.jar$@o } $info->sorted_index; tag 'javalib-but-no-public-jars'; diff --git a/debian/changelog b/debian/changelog index 9be3d2f..f11dfd8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,8 @@ lintian (2.5.22.2) UNRELEASED; urgency=medium (Closes: #737867). * checks/java.{desc,pm}: + [SL] Catch uses of Java8 byte code + + [SL] Do not trigger a warning when a jar is not in /usr/share/java and + the package name matches lib.*maven.*plugin.*java -- Bastien Roucariès <roucaries.bastien+deb...@gmail.com> Mon, 31 Mar 2014 18:52:04 +0200 diff --git a/t/tests/java-jars/debian/debian/control.in b/t/tests/java-jars/debian/debian/control.in index 978cfe7..6c9d16f 100644 --- a/t/tests/java-jars/debian/debian/control.in +++ b/t/tests/java-jars/debian/debian/control.in @@ -43,6 +43,15 @@ Description: {$description} - part C . This package should not be installed. +Package: libtest-maven-plugin-java +Architecture: {$architecture} +Depends: $\{misc:Depends\} +Description: {$description} - part D + This is a test package designed to test various aspects of the + java-related QA code in lintian. Fourth part. + . + This package should not be installed. + Package: unparsable Architecture: {$architecture} Depends: $\{misc:Depends\} diff --git a/t/tests/java-jars/debian/debian/libtest-maven-plugin-java.install b/t/tests/java-jars/debian/debian/libtest-maven-plugin-java.install new file mode 100644 index 0000000..f05e797 --- /dev/null +++ b/t/tests/java-jars/debian/debian/libtest-maven-plugin-java.install @@ -0,0 +1 @@ +testa.jar /usr/share/maven-repo/org/apache/maven/plugins/maven-site-plugin/2.1/ -- 1.9.0.279.gdc9e3eb