Home | Docs | Forums | Lists | Bugs | Planet | Store | GMN | Get Gentoo!
Not eligible to see or edit group visibility for this bug.
View Bug Activity | Format For Printing | XML | Clone This Bug
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 an attachment (id=96383) [details] 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 an attachment (id=96790) [details] 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 an attachment (id=96838) [details] 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 :)