Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 156228 - depend-java-query from java-config does not handle conditional DEPEND properly
Summary: depend-java-query from java-config does not handle conditional DEPEND properly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 157257
  Show dependency tree
 
Reported: 2006-11-25 09:51 UTC by Petteri Räty (RETIRED)
Modified: 2006-12-17 09:35 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petteri Räty (RETIRED) gentoo-dev 2006-11-25 09:51:20 UTC
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.
Comment 1 Petteri Räty (RETIRED) gentoo-dev 2006-11-25 09:53:37 UTC
My doc? atom was missing || ( ) but adding that did not help.
Comment 2 Josh Nichols (RETIRED) gentoo-dev 2006-11-25 12:42:31 UTC
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.
Comment 3 Petteri Räty (RETIRED) gentoo-dev 2006-12-06 11:44:33 UTC
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.
Comment 4 Petteri Räty (RETIRED) gentoo-dev 2006-12-17 09:35:35 UTC
Fixed in 2.0.31.