[lintian] 01/01: Drop problematic missing-classpath check. (Closes: #857123)
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository lintian.
commit 98fbf8152be2b67a63feb22f0ace8a8b292c0c1a
Author: Chris Lamb <lamby@debian.org>
Date: Sun Sep 3 07:20:51 2017 +0100
Drop problematic missing-classpath check. (Closes: #857123)
---
checks/java.desc | 17 -----------------
checks/java.pm | 21 +--------------------
debian/changelog | 1 +
t/tests/java-classpath/desc | 1 -
t/tests/java-classpath/tags | 1 -
5 files changed, 2 insertions(+), 39 deletions(-)
diff --git a/checks/java.desc b/checks/java.desc
index be1d5b9..fd31dad 100644
--- a/checks/java.desc
+++ b/checks/java.desc
@@ -56,23 +56,6 @@ Ref: java-policy 2.2
Info: Packages containing an executable JAR must depend on jarwrapper or
other packages providing similar functionalities.
-Tag: missing-classpath
-Severity: normal
-Certainty: possible
-Info: None of the jar files contained in the package declare a Class-Path
- in their manifest, but the package depends on at least one java library.
- That means that either the dependency is not needed or at least one of
- the JARs should include a classpath.
- .
- It is important to keep the classpath up-to-date to allow the
- automatic detection of dependencies at run time. Having a Class-Path
- element in the manifest allows for painless transitions if the class
- path of the dependencies of the library ever changes.
- .
- Failing to do that means that for every change in class path, all
- rdepends must update their wrapper scripts, which is a lot of work
- for nothing.
-
Tag: javalib-but-no-public-jars
Severity: minor
Certainty: possible
diff --git a/checks/java.pm b/checks/java.pm
index 4f09981..ed796bb 100644
--- a/checks/java.pm
+++ b/checks/java.pm
@@ -35,7 +35,6 @@ sub run {
my ($pkg, undef, $info) = @_;
my $java_info = $info->java_info;
my $missing_jarwrapper = 0;
- my $need_cp = 0;
my $has_public_jars = 0;
my $has_jars = 0;
my $jmajlow = '-';
@@ -47,8 +46,6 @@ sub run {
my @java_lib_depends = ($depends =~ m/\b(lib[^\s,]+-java)\b/og);
- $need_cp = 1 if @java_lib_depends;
-
# We first loop over jar files to find problems
for my $jar_file (sort keys %{$java_info}) {
@@ -149,14 +146,7 @@ sub run {
tag 'missing-manifest', $jar_file;
}
- if (!$cp) {
- # Do we have OSGi instead?
- $need_cp = 0 if $bsname;
- # Maybe it is a maven plugin?
- $need_cp = 0
- if $need_cp
- && any { m,^META-INF/maven/plugin.xml$,io } keys %$files;
- } else {
+ if ($cp) {
# Only run the tests when a classpath is present
my @relative;
my @paths = split(m/\s++/o, $cp);
@@ -232,15 +222,6 @@ sub run {
}
}
- 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
- # library without having a jar file, but we ignore some jars
- # (e.g. in JVMs) so going safe here.
- tag 'missing-classpath', join(', ', @java_lib_depends);
- }
-
my $is_transitional = $info->is_pkg_class('transitional');
if (!$has_public_jars && !$is_transitional && $pkg =~ /^lib[^\s,]+-java$/){
# Skip this if it installs a symlink in usr/share/java
diff --git a/debian/changelog b/debian/changelog
index bca47c7..1b53ff4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -67,6 +67,7 @@ lintian (2.5.53) UNRELEASED; urgency=medium
* checks/java.pm:
+ [CL] Additionally consider .cljc files as code to avoid false-
positive codeless-jar warnings. (Closes: #870649)
+ + [CL] Drop problematic missing-classpath check. (Closes: #857123)
* checks/menu-format.desc:
+ [CL] Prevent false positives in desktop-entry-lacks-keywords-entry
for "Link" and "Directory" .desktop files. (Closes: #873702)
diff --git a/t/tests/java-classpath/desc b/t/tests/java-classpath/desc
index 7b33fa0..a78980d 100644
--- a/t/tests/java-classpath/desc
+++ b/t/tests/java-classpath/desc
@@ -5,5 +5,4 @@ Description: Various checks about JAR files
Author: Vincent Fourmond <fourmond@debian.org>
Section: java
Test-For:
- missing-classpath
classpath-contains-relative-path
diff --git a/t/tests/java-classpath/tags b/t/tests/java-classpath/tags
index 1d7b0c6..2edfb49 100644
--- a/t/tests/java-classpath/tags
+++ b/t/tests/java-classpath/tags
@@ -1,2 +1 @@
-W: libcp-missing-java: missing-classpath libdepends-java
W: libcp-relative-java: classpath-contains-relative-path usr/share/java/cp-relative-1.0.jar: obviously-relative/stuff.jar
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: