How to reproduce bugs: I emerged ibm-jdk-1.4.0 and a java-config --list-available-vms returns: [sun-j2sdk-1.4.0] Sun JDK 1.4.0 (/etc/env.d/java/20sun-j2sdk-1.4.0) [ibm-jdk-1.4.0] IBM JDK 1.4.0 (/etc/env.d/java/20ibm-jdk-1.4.0) [sun-jdk-1.4.1.01] Sun JDK 1.4.1.01 (/etc/env.d/java/20sun-jdk-1.4.1.01) then i updated ibm-jdk-1.4.0 to ibm-jdk-1.4.0-r1 and restarted, and a java-config --list-available-vms returns: [sun-j2sdk-1.4.0] Sun JDK 1.4.0 (/etc/env.d/java/20sun-j2sdk-1.4.0) [sun-jdk-1.4.1.01] Sun JDK 1.4.1.01 (/etc/env.d/java/20sun-jdk-1.4.1.01) It doesnt list ibm-jdk How to fix it: emerge unmerge ibm-jdk emerge ibm-jdk (ibm-jdk-1.4.0-r1) and things get fixed. This bug is apparently on portage.
jrray, can you look at this bug ?
[18:00:06] <Azarah> maybe add jrray to that bug as well [18:00:31] <Azarah> he said last time he found one or two possible places where it could corrupt memory, [18:00:40] <Azarah> but did not commit any fixes for those
I can tell you why the file gets deleted. When the newer ebuild is merged, the older ebuild is unmerged (with AUTOCLEAN on), or if you have AUTOCLEAN disabled the file doesn't get deleted until you 'emerge clean'. During the unmerge (clean), 'ebuild.sh postrm' is run. java.eclass contains: pkg_postrm() { java_rm_env ${VMHANDLE} } java_rm_env() { rm -f ${ROOT}/etc/env.d/java/20`basename $1` || die } The java eclass blindly deletes the env file during any unmerge whether the package is being unmerged completely or if just an older version is being unmerged. My recommendation is to remove that section from java.eclass. The file in question that is being deleted (/etc/env.d/java/20ibm-jdk-1.3.1) is created during src_install() with set_java_env. It gets created in the image directory ${D} and is later merged into the live filesystem by portage. Portage will track that file and delete it (or not delete it) as appropriate when the package is later unmerged (or cleaned). Caveat: it won't be deleted if it is common for users to modify this file. But I think this is definately the lesser of two evils.
This got fixed with jrray's sandbox updates, no?
Did jrray fix, and it worked well, so commiting it.