Summary: | emerge ant fails with "Warning: JAVA_HOME environment variable not set." | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Steven Elling <ellingsw+20942> |
Component: | Current packages | Assignee: | Java team <java> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Not very ideal patch for the ebuild |
Description
Steven Elling
2003-10-09 11:05:16 UTC
Created attachment 19022 [details, diff]
Not very ideal patch for the ebuild
This patch is not ideal because an admin cannot start an emerge (i.e. xalan)
or
upgrade that depends on ant and walk away while it runs.
The patch adds a check to pkg_setup() to verify which Java environment is
selected and fail if the correct one is not selected.
The setting of JAVA_HOME to JDK_HOME was removed because it is redundant.
Also, 'java-config --list-available-packages' is now borked after the install. 'java-config --list-available-packages' produces the following output: [ant] Java-based build tool similar to 'make' that uses XML configuration files. (/usr/share/ant/package.env) [fop] "" (/usr/share/fop/package.env) [saxon] The SAXON package is a collection of tools for processing XML documents: XSLT processor, XSL library, parser. (/usr/share/saxon/package.env) Disregard that last comment about "java-config --list-available-packages". I was thinking "java-config --list-available-vms" but using "java-config --list-available-packages" instead. My bad. It is caused by blackdown-jdk not adding its environment vars to /etc/env.d but to /etc/env.d/java. env-update doesn't process subdirs it seems. Just copy the file to proceed. After setting the VM with java-config did you made env-update && source /et/profile ??? Moving this again to java@gentoo.org, so everyone out there can help. I think that if you emerge ant, it will need a vm an it will install the default one. If a user changes the default system VM ant its not responsible of checking it cause it was installed correctly, but the user broke the configuration. If this error is checked here, it will need to be checked on every java ebuild, so its not an option. Well the thing of it is I didn't change the default VM before I had problems with ant. I think the first time blackdown-jre-1.4.1 was required by an ebuild was when I installed OpenOffice-bin. Another package I installed later on depended on blackdown-jdk-1.4.1 but the Java VM was not changed by the ebuild. I can't remember which package it was. |