The summary says it all. The file gets installed to /etc/env.d/java instead of /etc/env.d Copying the file one level up fixes the problems with missing JAVA_HOME.
Call me crazy, but Im pretty sure this is normal, and java-config is supposed to be used to select the active vm (which puts the file into /etc/env) and then an env-update fixes the problem. So this doesnt seem at all like a valid resolution.
Wait, it braks automatic emerging of packages, e.g. emerge system gets broken.
I've posted too soon, sorry for spamming. It seems that the ebuild doesn't call java-config to select the VM.
Changing summary. The check for default VM is broken, because now java puts an error on stdout, which gets caught.
Reopening, as the summary is changed.
Created attachment 20339 [details, diff] Seemingly working patch
which version of java-config did you have installed ?
Problem is with both 1.1.1 and 1.1.2.
can you try with java-config-1.1.4 ?
Created attachment 20433 [details] Quick testcase 1.1.4 still has the bug. The test is just like the one in java_pkg_postinst of java.eclass. Check it after unsetting JAVA_HOME.
Created attachment 20434 [details] meh, exact testcase This is just like the original java.eclass. The previous one has -n instead of -z and swapped infos.
Created attachment 20435 [details] testcase with fixed check
try updating making a sync first, i have made some changes on java.eclass code, also use java-config-1.1.5, then after that report if the problem its still there. Thanks.
It works now, thank you for your time.