Bug#239123: [Build-common-hackers] Bug#239123: cdbs: ant class fails if JAVA_HOME_DIRS points to a empty dir

Jan Schulz Jan Schulz <default@katzien.de>, 239123@bugs.debian.org
Mon, 22 Mar 2004 18:00:33 +0100


Hallo Stefan,

* Stefan Gybas wrote:
>JAVA_HOME_DIRS is more or less a hack to support the changed location of 
>java.home in different versions of j2sdk1.3 and j2sdk1.4. You should try 
>to avoid it if possible and only use JAVA_HOME and build depend on a 
>recent version of j2sdk*.

Yes, but as there are only very outdated versions of BD packages (yes
I know they want to get newer ones uploaded), I use j2se-package to
make my own JDK packages. And they have different locations.

I'm also still (see the policy proposal last year :) arguing to not
depend on one special version of a piece of software, when others are
solving the same problem.

>This is documented behaviour. From /usr/share/cdbs/1/class/ant-vars.mk:
># The home directory of the Java Runtime Environment (JRE) or Java
># Development Kit (JDK). You can either directly set JAVA_HOME in
># debian/rules or set JAVA_HOME_DIRS to multiple possible home
># directories. The first existing directory from this list is used for
># JAVA_HOME.

Yes, but IMO still a bug.

You are testing for a valid dir, but in the next step you assign
JAVACMD to JAVA_HOME/bin/java and use only that. So JAVA_HOME is
protected by the test, but not JAVA_HOME/bin/java.

IMO this test should be changed to reflect this.

Jan
-- 
Jan Schulz                     jasc@gmx.net
     "Wer nicht fragt, bleibt dumm."