Summary: | depend-java-query from java-config does not handle conditional DEPEND properly | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Petteri Räty (RETIRED) <betelgeuse> |
Component: | Current packages | Assignee: | Java team <java> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 157257 |
My doc? atom was missing || ( ) but adding that did not help. depend-java-query is the script that does the real magic. the java-utils-2 does calls in to figure out what -target / -source / vm to use. depend-java-query gets passed the DEPEND/RDEPEND (depending on the situation). depend-java-query is very naive, in that it only checks for known patterns, ie =virtual/jdk-1.4*, >=virtual/jdk-1.5. In particular, it doesn't deal use flags. so in the example, it sees >=virtual/jdk-1.4 as being the 'best' match, so uses that. JAVA_PKG_NV_DEPEND can be used to explicitly say what to pass to depend-java-query. This is used in a few cases (ie dev-util/eclipse-sdk), but doesn't seem to be documented at all. http://overlays.gentoo.org/proj/java/changeset/3334 http://dev.gentoo.org/~betelgeuse/patches/java-utils-2.eclass-use.patch With these two changes you can use conditional DEPEND/RDEPEND values. Fixed in 2.0.31. |
In the ebuild: # javadoc does not build correctly with 1.6 DEPEND=" doc? ( =virtual/jdk-1.4* =virtual/jdk-1.5* ) !doc? ( >=virtual/jdk-1.4 ) Trying to emerge: pena trang # USE="doc" devebuild trang-20030619-r2.ebuild clean compile * trang-20030619.zip MD5 ;-) ... [ ok ] * trang-20030619.zip RMD160 ;-) ... [ ok ] * trang-20030619.zip SHA1 ;-) ... [ ok ] * trang-20030619.zip SHA256 ;-) ... [ ok ] * trang-20030619.zip size ;-) ... [ ok ] * Using: sun-jdk-1.6 >>> Unpacking source... The good thing is that this is a corner case but at the very least we should document that this is not supported at this time or implement the needed code to fix this.