Summary: | dev-java/jdom dev-java/jdom-jaxen circular dependencies trigger java-utils-2.eclass java-pkg_switch-vm failure due wrong PDEPEND assumptions | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Fabio Erculiani (RETIRED) <lxnay> |
Component: | New packages | Assignee: | Java team <java> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | brad, dschridde+gentoobugs, treecleaner, ulm |
Priority: | Normal | Keywords: | PMASKED |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://archives.gentoo.org/gentoo-dev/msg_9918c8427c3213960f431f68344fd12e.xml | ||
Whiteboard: | Pending removal: 2018-07-17 | ||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 559994 | ||
Bug Blocks: |
Description
Fabio Erculiani (RETIRED)
![]() Generally, you cannot rely on any dependency (outside of the system set) being present in pkg_setup: <http://dev.gentoo.org/~ulm/pms/head/pms.html#x1-720008> (In reply to comment #0) > For example, in case of app-office/libreoffice emerged with USE="java", during > pkg_setup, java-pkg_switch-vm gets called and the snippet below expects to find > a completely sane JDK environment: > > elif [[ "${JAVA_PKG_ALLOW_VM_CHANGE}" == "yes" ]]; then > debug-print "depend-java-query: NV_DEPEND: > ${JAVA_PKG_NV_DEPEND:-${DEPEND}}" > GENTOO_VM="$(depend-java-query --get-vm > "${JAVA_PKG_NV_DEPEND:-${DEPEND}}")" > if [[ -z "${GENTOO_VM}" || "${GENTOO_VM}" == "None" ]]; then > die <- it dies here It expects to find an installed JDK matching the spec in DEPEND. The only time this is clearly broken is if MERGE_TYPE == binary and isn't related to jdom-jaxen. However, would have been interesting to see the actual die message and to know the available JDKs to rule out a bug in java-config. > > At that point, if java-check-environment is polled, it says: > * Checking package_env ... > !!! ERROR: Package jdom-jaxen-1.0 was not found! > * Broken dependencies for dev-java/jdom-1.0-r4 > * Please try emerge -uD1 =dev-java/jdom-1.0-r4 > Which is perfectly valid as the batch install didn't succeed and so the system can't be assumed to be in a clean state. If something wants jdom-jaxen it should DEPEND on it instead of jdom, which is the current solution. > The solution would be creating a virtual package for jdom, containing > dev-java/jdom and dev-java/jdom-jaxen as RDEPEND and fixup all the reverse > dependencies. > One more solution to jdom being in a dependency cycle with jaxen is to make jaxen a useflag for jdom. This would result in the jar being the same as upstream is shipping. On the downside it requires the user to toggle a useflag for a first install. Ideally the packages jdom and jdom-jaxen would have been named the other way around. Would have been less confusing to use jdom-jaxen for jaxen and jdom otherwise. I currently get: (dev-java/jdom-jaxen-1.0-r1::gentoo, ebuild scheduled for merge) depends on (dev-java/jaxen-1.1.4-r1::gentoo, ebuild scheduled for merge) (buildtime) (dev-java/jdom-jaxen-1.0-r1::gentoo, ebuild scheduled for merge) (buildtime) Is this the same bug? How can it be fixed? I don't think jdom relies on its own jaxen anymore. I never use that when I use jdom. It seems to be a dep for after install. I just provided updated ebuilds for jdom 1.x bug 215958 and jdom 2.x bug 496986. Neither of those are using jdom-jaxen. I think the entire jdom-jaxen package can be removed once deps using jdom:1.0 are updated to jdom:0. That should fix the circular dependency problem. jdom-jaxen is being removed. |