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

[lintian] 01/01: missing-classpath should be disabled on Java binaries



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

broucaries-guest pushed a commit to branch master
in repository lintian.

commit b6b858419956c3f8057fed530ebdce1eaf918de1
Author: Sylvestre Ledru <sylvestre@debian.org>
Date:   Fri May 2 14:52:52 2014 +0200

    missing-classpath should be disabled on Java binaries
---
 checks/java.pm                                               |  2 +-
 debian/changelog                                             |  1 +
 t/tests/java-classpath/debian/debian/binary-using-java.jlibs |  1 +
 t/tests/java-classpath/debian/debian/control.in              | 11 +++++++++++
 t/tests/java-classpath/debian/debian/rules                   |  1 +
 5 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/checks/java.pm b/checks/java.pm
index 5e7eac1..c815c18 100644
--- a/checks/java.pm
+++ b/checks/java.pm
@@ -231,7 +231,7 @@ sub run {
         }
     }
 
-    if ($has_jars && $need_cp) {
+    if ($has_jars && $need_cp && $pkg =~ /^lib[^\s,]+-java$/) {
         # Only tag if there is at least one jar file and one strong
         # java dependency and no classpath/osgi.  Technically there
         # should be no reason to have a strong relation with a java
diff --git a/debian/changelog b/debian/changelog
index 0d70935..a55f0dc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -30,6 +30,7 @@ lintian (2.5.23) UNRELEASED; urgency=medium
     + [SL] Catch uses of Java8 byte code.  (Closes: #743384).
     + [SL] Warn that the suggests/recommends on libservlet[\d\.]+-java is
       needless (Closes: #743453)
+    + [SL] missing-classpath should be disabled on Java binaries
     + [NT] Exclude some jar files from "codeless-jar" tag based
       on the basename of the jar file.  This is intended to
       reduce the number of codeless jars for source/doc jars in
diff --git a/t/tests/java-classpath/debian/debian/binary-using-java.jlibs b/t/tests/java-classpath/debian/debian/binary-using-java.jlibs
new file mode 100644
index 0000000..5e5f31e
--- /dev/null
+++ b/t/tests/java-classpath/debian/debian/binary-using-java.jlibs
@@ -0,0 +1 @@
+cp-missing-2.jar
diff --git a/t/tests/java-classpath/debian/debian/control.in b/t/tests/java-classpath/debian/debian/control.in
index 115ceaf..b1231c7 100644
--- a/t/tests/java-classpath/debian/debian/control.in
+++ b/t/tests/java-classpath/debian/debian/control.in
@@ -24,3 +24,14 @@ Description: {$description} - relative
  installed.
  .
  Test for relative classpaths.
+
+
+Package: binary-using-java
+Architecture: {$architecture}
+Depends: $\{misc:Depends\}, libdepends-java
+Description: {$description} - binary
+ This is a test package designed to test various aspects of the
+ java-related QA code in lintian. This package should not be
+ installed.
+ .
+ Test for classpaths in binary.
diff --git a/t/tests/java-classpath/debian/debian/rules b/t/tests/java-classpath/debian/debian/rules
index 17a2e14..1d7125d 100755
--- a/t/tests/java-classpath/debian/debian/rules
+++ b/t/tests/java-classpath/debian/debian/rules
@@ -5,3 +5,4 @@
 
 override_jh_build:
 	jh_build --javacopts='-target 1.4' --javacopts='-source 1.4'
+	cp cp-missing.jar cp-missing-2.jar

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


Reply to: