Package: libdbus-java
Version: 2.7-1
Tags: patch

The package uses absolute paths for entries in the package class path
whereas it should be using relative paths.  This results in a compiler
warning, though AFAICT the package works correctly.

[This bug was originally discovered under Ubuntu lucid (10.04.1) using
libdbus-java version 2.7-1 and openjdk-6-jdk version
6b18-1.8.1-0ubuntu1.  I originally reported the bug to Ubuntu [1] but
was asked to report it to Debian.  Based on looking at the debian/rules
file in the source package, the same problem is present in the Debian
versions 2.7-1 and 2.8-1 of the package (I haven't looked at other
versions).]

To reproduce:

$ echo 'public class Foo {}' >Foo.java
$ /usr/lib/jvm/java-6-openjdk/bin/javac -Xlint:path -classpath
/usr/share/java/dbus.jar Foo.java
warning: [path] bad path element
"/usr/share/java/usr/share/java/unix.jar": no such file or directory
warning: [path] bad path element
"/usr/share/java/usr/share/java/hexdump.jar": no such file or directory
2 warnings

The two warnings are caused by the problem.

The problem is that the rules file adds some jar dependencies to the
package's Class-Path using absolute paths, whereas (e.g., according to
[2]) relative paths should be used. I have attached a patch to fix the
problem.

[1] https://bugs.launchpad.net/ubuntu/+source/dbus-java/+bug/663277
[2]
http://java.sun.com/developer/Books/javaprogramming/JAR/basics/manifest.html#download

-- 
Michael Haggerty
mhag...@alum.mit.edu
http://softwareswirl.blogspot.com/
diff -ur dbus-java-2.7-orig/debian/rules dbus-java-2.7/debian/rules
--- dbus-java-2.7-orig/debian/rules	2010-12-14 09:25:14.000000000 +0100
+++ dbus-java-2.7/debian/rules	2010-12-14 09:26:00.000000000 +0100
@@ -37,8 +37,8 @@
 override_dh_install:
 	dh_install -i --sourcedir=debian/tmp
 override_jh_manifest:
-	jh_manifest -plibdbus-java -c"/usr/share/java/unix.jar /usr/share/java/hexdump.jar"
-	jh_manifest -pdbus-java-bin -c"/usr/share/java/dbus-$(VERSION).jar"
+	jh_manifest -plibdbus-java -c"unix.jar hexdump.jar"
+	jh_manifest -pdbus-java-bin -c"dbus-$(VERSION).jar"
 override_jh_depends:
 	jh_depends -pdbus-java-bin -jopen
 	jh_depends -plibdbus-java 
Only in dbus-java-2.7/debian: rules~

Reply via email to