Hello. Opening new bug, as requested. I have not checked other java eclasses but at least inside java-utils-2 eclass die is calling in subshell, and the result is that the process actually does not die but stay alive. See bug 145679 for example output. See (about die and subshell): http://devmanual.gentoo.org/ebuild-writing/error-handling/index.html TIA
Created attachment 96383 [details, diff] proposed patch * failure on depend-java-query for getting the GENTOO_VM is detected and dies earlier, because depend-java-query sux, it has to test result to be empty or == "None" * java-pkg_javac-args doesn't die, it echoes error as output and returns 1, stuff using it checks return value * the same with java-pkg_get-javac and a bonus: * ejavac() doesn't default to javac anymore, but calls java-pkg_get-javac, call to java-pkg_init-compiler_ is moved from get-javac to ejavac so the einfo isn't echoing in subshell
Patch looks reasonable. Only thing I would change is: -[[ ${?} ]] || die "java-pkg_javac-args failed" +[[ ${?} != 0 ]] && die "java-pkg_javac-args failed" Nothing wrong with it, as in, it works, but IMO, this is a bit clearer.
Created attachment 96790 [details, diff] updated patch Updated to apply to current eclass. The tests nichoj didn't like changed to full if construct to give better error output.
Created attachment 96838 [details, diff] even more updated patch eerrors extended to tell what failed I'm now using the patch extensively.
How bout teh commit?
After nichoj's permission, it's in CVS :)