Package: javahelper Version: 0.32 Severity: normal Tags: patch Whenever jh_depends is to process jar files which are symlinks with relative paths (ex. ../../../java/somejar.jar), jh_depends fails complaining that the file does not exist. This happens when a symlink to a jar file is installed with dh_link.
Attached is a patch that allows jh_depends to cope with jar files as symlinks. -- System Information: Debian Release: 6.0 APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages javahelper depends on: ii bsdmainutils 8.2.1 collection of more utilities from ii dctrl-tools 2.14.5 Command-line tools to process Debi ii debhelper 8.0.0 helper programs for debian/rules ii devscripts 2.10.69 scripts to make the life of a Debi ii dpkg-dev 1.15.8.8 Debian package development tools ii fastjar 2:0.98-3 Jar creation utility ii libarchive-zip-perl 1.30-3 Perl module for manipulation of ZI javahelper recommends no packages. Versions of packages javahelper suggests: ii cvs 1:1.12.13-12 Concurrent Versions System ii gawk 1:3.1.7.dfsg-5 GNU awk, a pattern scanning and pr pn tofrodos <none> (no description available) -- no debconf information
diff --git a/jh_depends b/jh_depends index 1bce83c..585d5b1 100755 --- a/jh_depends +++ b/jh_depends @@ -128,7 +128,23 @@ for p in $PACKAGES; do if [ -x "$i" ]; then WRAPPER="true" fi - jar xf "$i" + if [ -L "$i" ]; then + realpath=$(echo \ + $(dirname \ + $(echo "$i" | perl -pi -e 's#^.*?/debian/[^/]+##g' \ + ) \ + )/$(readlink "$i") \ + ) + if [ ! -e "$realpath" ]; then + realpath=$(readlink "$i") + if [ ! -e "$realpath" ]; then + continue + fi + fi + jar xf "$realpath" + else + jar xf "$i" + fi classversion=`getclassversion $classversion .` JARDEPS="$JARDEPS `extractline META-INF/MANIFEST.MF Class-Path`" if grep ^Main-Class META-INF/MANIFEST.MF >/dev/null; then