Bug#626329: jh_classpath still breaks symlinks

Vincent Fourmond fourmond at gmail.com
Sun May 15 18:49:03 UTC 2011


reopen 626329
found 626329 0.35
thanks

  Hello !

  Unless I'm very much mistaken, jh_classpath still breaks symlinks, see:

20:38 vincent at tanyaivinco
~/tmp/js/jsymphonic-0.3.0.Ode.To.Freedom+svn387 ls -l
debian/jsymphonic/usr/share/java/*
-rw-r--r-- 1 vincent vincent 1932895 May 15 20:38
debian/jsymphonic/usr/share/java/jsymphonic-0.3.0.Ode.To.Freedom+svn387.jar
lrwxrwxrwx 1 vincent vincent      42 May 15 20:38
debian/jsymphonic/usr/share/java/jsymphonic.jar ->
jsymphonic-0.3.0.Ode.To.Freedom+svn387.jar
20:39 vincent at tanyaivinco
~/tmp/js/jsymphonic-0.3.0.Ode.To.Freedom+svn387 jh_classpath
-pjsymphonic
20:39 vincent at tanyaivinco
~/tmp/js/jsymphonic-0.3.0.Ode.To.Freedom+svn387 ls -l
debian/jsymphonic/usr/share/java/*
-rw-r--r-- 1 vincent vincent 1932895 May 15 20:38
debian/jsymphonic/usr/share/java/jsymphonic-0.3.0.Ode.To.Freedom+svn387.jar
-rw-r--r-- 1 vincent vincent 1932930 May 15 20:39
debian/jsymphonic/usr/share/java/jsymphonic.jar
20:39 vincent at tanyaivinco
~/tmp/js/jsymphonic-0.3.0.Ode.To.Freedom+svn387 jh_classpath -V
Javahelper Version 0.35

  Looking at the code, it makes sense:

        if ( -l $target ){
            # Follow links
            my $dest = Cwd::abs_path($target);
            error("Cannot resolve link $target: $!") unless $dest;
            $target = $dest;
            $link = 1;
        }
        # no-act implies others tools are in no-act mode as well
        error("Cannot update $jar: it does not exist.") unless -f $jar
or !$dh{NO_ACT};
        if ($link){
            verbose_print("Updating symlinked $target (via $orig)");
        } else {
            verbose_print("Updating $target");
        }
        update_jar($jar, undef) unless $dh{NO_ACT};

  You modify $target to point to the target of the link, but you keep
on modifying $jar, which still points to the symlink.

  Cheers,

      Vincent





More information about the pkg-java-maintainers mailing list