Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 147392 - "-source X" ommited in JAVACFLAGS in java-utils-2.eclass when using a VM that has SLOT="0"
Summary: "-source X" ommited in JAVACFLAGS in java-utils-2.eclass when using a VM that...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-12 15:43 UTC by Vlastimil Babka (Caster) (RETIRED)
Modified: 2006-09-13 02:05 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
the very simple patch (java-utils-2.eclass-get-vm-version.patch,398 bytes, patch)
2006-09-12 15:51 UTC, Vlastimil Babka (Caster) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-09-12 15:43:35 UTC
Flameeyes gave me a log of antlr failing on x86-fbsd with diablo-jdk. The problem was:

javac: target release 1.2 conflicts with default source release 1.5
...
GENTOO_VM=diablo-jdk  CLASSPATH="" JAVA_HOME="/opt/diablo-jdk-1.5.0.07.00"
JAVACFLAGS="+ -target 1.2" COMPILER=""

Apparently -source 1.2 was missing. java-pkg_javac-args() doesn't set -source if the VM is not >=1.4 (probably 1.3- doesn't support it). The VM version is determined in java-pkg_get-vm-version() which calls sed on GENTOO_VM string. For an unslotted JDK like diablo-jdk or KAFFE, there is no version in GENTOO_VM thus it all fails and -source is not set.

So, Diego already slotmoved diablo-jdk and jre to 1.5 as I advised him to do. But that leaves kaffe broken. The check in the eclass is probably obsolete now that we are 1.4+ only, but still I think the get-vm-version() function should be fixed. Because each VM stores a PROVIDES_VERSION in its env file, java-config could be used to extract it, instead of the failing sed on GENTOO_VM.
Comment 1 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-09-12 15:51:33 UTC
Created attachment 96841 [details, diff]
the very simple patch

any objections? :)
Comment 2 Josh Nichols (RETIRED) gentoo-dev 2006-09-12 23:16:26 UTC
Indeed, much cleaner than using sed voodoo. Go ahead and apply it.
Comment 3 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-09-13 02:05:44 UTC
Commited