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

[SCM] Debian package checker branch, master, updated. 2.5.0-rc3-30-g0db0abb



The following commit has been merged in the master branch:
commit 0db0abbea89f76bff542098d0713feff1e8d970b
Author: Niels Thykier <niels@thykier.net>
Date:   Fri May 6 11:18:10 2011 +0200

    Fixed false-positive missing-classpath for -doc packages

diff --git a/checks/java b/checks/java
index 9663203..06bc10d 100644
--- a/checks/java
+++ b/checks/java
@@ -38,9 +38,10 @@ my $missing_jarwrapper = 0;
 my $has_classpath = 0;
 my $has_osgi = 0;
 my $has_public_jars = 0;
+my $has_jars = 0;
 
 my @java_lib_depends = ($info->relation('strong')->unparse() =~
-			/(lib[^\s,]+-java)/g);
+			/^lib[^\s,]+-java$/g);
 
 # We first loop over jar files to find problems
 
@@ -56,6 +57,8 @@ for my $jar_file (keys %{$java_info}) {
     # The Java Policy says very little about requires for (jars in) JVMs
     next if $jar_file =~ m#usr/lib/jvm(?:-exports)?/[^/]++/#o;
 
+    $has_jars = 1;
+
     if($jar_file =~ m#^usr/share/java/[^/]+\.jar$#o) {
 	$has_public_jars = 1;
     }
@@ -127,7 +130,11 @@ for my $jar_file (keys %{$java_info}) {
 tag 'missing-dep-on-jarwrapper' if $missing_jarwrapper;
 
 
-if(! $has_classpath && ! $has_osgi && @java_lib_depends) {
+if($has_jars && ! $has_classpath && ! $has_osgi && @java_lib_depends) {
+    # 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);
 }
 
diff --git a/debian/changelog b/debian/changelog
index 9d84bc9..f4e5e93 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -24,6 +24,12 @@ lintian (2.5.0~rc4) UNRELEASED; urgency=low
   * checks/debian-source-dir{,.desc}:
     + [NT] Applied patch from David Bremner to enable
       git-patches-not-exported.  (Closes: #607694)
+  * checks/java:
+    + [NT] Tightened the regex for finding java libraries and restricted
+      missing-classpath tag to only be emitted for packages that actually
+      contain at least one jar file we check.  This fixes false-positives
+      for packages that depended on libX-java-doc packages or packages
+      that only contain jar files we ignore.
 
   * lib/Lintian/ProcessableGroup.pm:
     + [NT] Properly handle if the changes file is located directly in the

-- 
Debian package checker


Reply to: