Summary: | Circular dependencies between dev-java/ant-core, virtual/jdk, dev-java/icedtea | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Marian Kyral <mkyral> |
Component: | [OLD] Java | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ago, chewi, derk.tebokkel, dogdeblack, java, mgorny, proxy-maint, rose |
Priority: | Normal | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=703440 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 384107 | ||
Bug Blocks: | 247140, 705986, 706142 |
Description
Marian Kyral
2011-09-09 19:25:43 UTC
Please emerge icedtea6-bin and virtual/jdk before icedtea (In reply to comment #1) > Please emerge icedtea6-bin and virtual/jdk before icedtea icedtea6-bin merged, but virtual/jdk requires oracle-jdk. # eix -I icedtea [I] dev-java/icedtea6-bin Available versions: 1.10.2!s 1.10.3!s {X alsa doc examples nsplugin source} Installed versions: 1.10.3!s(21:13:07 9.9.2011)(X alsa nsplugin -doc -examples -source) Homepage: http://icedtea.classpath.org Description: A Gentoo-made binary build of the icedtea6 JDK # emerge virtual/jdk Calculating dependencies... done! >>> Verifying ebuild manifests >>> Starting parallel fetch >>> Emerging (1 of 2) dev-java/oracle-jdk-bin-1.7.0 * Fetching files in the background. To view fetch progress, run * `tail -f /var/log/emerge-fetch.log` in another terminal. !!! dev-java/oracle-jdk-bin-1.7.0 has fetch restriction turned on. !!! This probably means that this ebuild's files must be downloaded !!! manually. See the comments in the ebuild for more information. * Fetch failed for 'dev-java/oracle-jdk-bin-1.7.0', Log file: * '/var/tmp/portage/dev-java/oracle-jdk-bin-1.7.0/temp/build.log' * Please download jdk-7-linux-x64.tar.gz from: * http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html * and move it to /var/portage/distfiles !!! Error while importing logging modules while loading "mod_jabber": No module named mod_jabber >>> Failed to emerge dev-java/oracle-jdk-bin-1.7.0, Log file: >>> '/var/tmp/portage/dev-java/oracle-jdk-bin-1.7.0/temp/build.log' *** Resuming merge... Ok, make it 'emerge virtual/jdk:1.6' then (In reply to comment #3) > Ok, make it 'emerge virtual/jdk:1.6' then Thanks, it helped. But emerge -uDN still wants to emerge oracle-jdk # emerge -uavtDN --with-bdeps=y @world These are the packages that would be merged, in reverse order: Calculating dependencies... done! [nomerge ] dev-java/icedtea-6.1.10.3 USE="hs20 nsplugin nss webstart xrender -cacao -debug -doc -examples -jamvm -javascript -nio2 -pulseaudio -systemtap -zero" [nomerge ] dev-java/ant-nodeps-1.8.1 [ebuild NS ] virtual/jre-1.7.0 [1.6.0] 0 kB [ebuild NS ] virtual/jdk-1.7.0 [1.6.0] 0 kB [ebuild N F ] dev-java/oracle-jdk-bin-1.7.0 USE="X alsa nsplugin -derby -doc -examples -jce" 92,746 kB Zac: any idea if portage could be smarter about this? I believe we discussed this already a while ago, but that was about why --onlydeps worked, IIRC. How bout adding some rule to the effect of "if package A depends on a virtual B, which has || (A x y z) dependencies, don't select A to resolve this set of alternatives, unless A is already installed. For now the dependency of A on B is transitive, but it could be made direct if it helped this rule. (A = icedtea, B = virtual/jdk. Icedtea depends on xalan, xerces, ant-nodeps, etc., that depend on virtual/jdk and other java packages that also depend on virtual/jdk (see the original comment) (In reply to comment #5) > How bout adding some rule to the effect of "if package A depends on a virtual > B, which has || (A x y z) dependencies, don't select A to resolve this set of > alternatives, unless A is already installed. For now the dependency of A on B > is transitive, but it could be made direct if it helped this rule. We already have code to handle this case, and it works with new-style virtuals too. Before it got removed from the tree, dev-lang/gwydion-dylan used to use a similar approach, though it didn't use a virtual, it could have: DEPEND="|| ( dev-lang/gwydion-dylan-bin dev-lang/gwydion-dylan )" (In reply to comment #6) > We already have code to handle this case, and it works with new-style virtuals > too. Before it got removed from the tree, dev-lang/gwydion-dylan used to use a > similar approach, though it didn't use a virtual, it could have: > > DEPEND="|| ( dev-lang/gwydion-dylan-bin dev-lang/gwydion-dylan )" dev-java/icedtea has this: || ( ( >=dev-java/gcj-jdk-4.3 >=app-admin/eselect-ecj-0.5-r1 ) ( >=dev-java/cacao-0.99.2 >=app-admin/eselect-ecj-0.5-r1 ) dev-java/icedtea6-bin dev-java/icedtea:${SLOT} ) So there are 3 non-circular alternatives before the package itself. That's fine. But it also has this: >=dev-java/xalan-2.7.0:0 >=dev-java/xerces-2.9.1:2 >=dev-java/ant-core-1.7.1-r2 dev-java/ant-nodeps And all of these have something like DEPEND=">=virtual/jdk-1.4" or similar. And although jdk-1.6.0 has again: || ( dev-java/icedtea6-bin =dev-java/icedtea-6* =dev-java/sun-jdk-1.6.0* ... )" (which means the -bin before non-bin), somehow this doesn't work and portage seems to decide to satisfy this by icedtea-6, (because it's already scheduled?). So somehow these transitive deps are a problem. I don't know if reordering the above blocks would help portage to fix icedtea6-bin before going through the xalan->jdk deps, or whatnot. There is probably the solution of changing all those java packages in the original post to depend on || ( icedtea6-bin virtual/jdk ) directly, but it seems rather fragile so I hope another solution can be found first :) *** Bug 390117 has been marked as a duplicate of this bug. *** *** Bug 290251 has been marked as a duplicate of this bug. *** (In reply to comment #7) > There is probably the > solution of changing all those java packages in the original post to depend > on || ( icedtea6-bin virtual/jdk ) directly, but it seems rather fragile so > I hope another solution can be found first :) OK so with xerces/xalan no longer deps of icedtea, the last package involved is dev-java/ant-core. So I changed its deps from virtual/jdk to || ( icedtea-bin virtual/jdk ) but it doesn't work, portage will prefer the virtual/jdk (even though it's not installed) and when evaluating it, it will prefer icedtea (this going circular) instead of icedtea-bin... [nomerge ] dev-java/icedtea-6.1.11.1 USE="X alsa cups jbootstrap nss source -cjk -debug -doc -examples -javascript -nsplugin -pax_kernel -pulseaudio -systemtap -test -webstart" [ebuild N ] dev-java/ant-core-1.8.2 USE="-doc -source" 0 kB [ebuild N ] virtual/jdk-1.6.0-r1 0 kB [ebuild N ] dev-java/icedtea-6.1.11.1 USE="X alsa cups jbootstrap nss source -cjk -debug -doc -examples -javascript -nsplugin -pax_kernel -pulseaudio -systemtap -test -webstart" 0 kB *** Bug 415139 has been marked as a duplicate of this bug. *** *** Bug 415139 has been marked as a duplicate of this bug. *** *** Bug 421095 has been marked as a duplicate of this bug. *** This issue manifests with --depclean --with-bdeps n, too. *** Bug 560434 has been marked as a duplicate of this bug. *** We're a little way off yet but this shouldn't matter when icedtea-7 goes away. icedtea-3 (Java 8) doesn't use Ant. To the person who came into #gentoo-java and rudely asked why this hasn't been fixed yet before leaving one minute later, it should have been assigned to the Portage team as this is probably a Portage bug. I did say above that we're a little way off removing icedtea-7 but progress has certainly been made in this area since then. It's not like this is even that big a deal. Very few people use icedtea over icedtea-bin and all you have to do is explicitly "emerge ant" first. *** Bug 623888 has been marked as a duplicate of this bug. *** @chewi, can this one be closed now? Bug #384107 is still open so the Portage issue is still there. icedtea:7 is gone from the main repo and icedtea:8 doesn't use Ant, however if you want to bootstrap with gcj (perhaps for a new arch) then we still point people to java-overlay where icedtea:7 is still maintained. I'd keep this open for now. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39293f8a4667fce2112792953dbc16f69b9fcb66 commit 39293f8a4667fce2112792953dbc16f69b9fcb66 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2019-12-24 00:52:27 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2019-12-24 00:57:38 +0000 sys-apps/portage: Bump to version 2.3.83 #384107 adjust || preference to break dependency cycles, which solves bug 382421 and bug 703440 #703348 emerge --with-test-deps: allow circular deps Bug: https://bugs.gentoo.org/701268 Bug: https://bugs.gentoo.org/382421 Bug: https://bugs.gentoo.org/384107 Bug: https://bugs.gentoo.org/703440 Bug: https://bugs.gentoo.org/703348 Package-Manager: Portage-2.3.83, Repoman-2.3.20 Signed-off-by: Zac Medico <zmedico@gentoo.org> sys-apps/portage/Manifest | 1 + sys-apps/portage/portage-2.3.83.ebuild | 276 +++++++++++++++++++++++++++++++++ 2 files changed, 277 insertions(+) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=f78a91e44e3e82008e89f05fe3871e2cb03a8646 commit f78a91e44e3e82008e89f05fe3871e2cb03a8646 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2019-12-23 05:42:16 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2019-12-24 00:40:07 +0000 backtracking: adjust || preference to break dependency cycles Store dependency cycle edges as backtracking parameters, and use them to adjust || preferences in order to break dependency cycles. This extends direct cycle breaking to handle indirect dependency cycles, which solves the cmake-bootstrap test case for bug 703440. If any cycle(s) remain unsolved by the next backtracking run, then backtracking aborts and the cycle(s) are reported as usual. Note that backtracking is necessary in order to avoid bugs of the form "emerge installs packages only to have them removed by depclean", since this sort of behavior is desirable only when it eliminates a dependency cycle. Bug: https://bugs.gentoo.org/382421 Bug: https://bugs.gentoo.org/384107 Bug: https://bugs.gentoo.org/703440 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/_emerge/depgraph.py | 42 ++++++++++++++++++++-- lib/_emerge/resolver/backtracking.py | 11 ++++-- lib/portage/dep/dep_check.py | 10 ++++++ .../tests/resolver/test_circular_choices.py | 25 +++++++++++++ 4 files changed, 84 insertions(+), 4 deletions(-) Making this block the latest relese (bug 706142) since the fix for bug 705986 is needed for completeness. |