Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 421095 - dev-java/jamvm-1.5.4-r2 has circular dependency via dev-java/gnu-classpath
Summary: dev-java/jamvm-1.5.4-r2 has circular dependency via dev-java/gnu-classpath
Status: RESOLVED DUPLICATE of bug 382421
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-14 12:25 UTC by Maxim Kammerer
Modified: 2012-06-15 11:07 UTC (History)
0 users

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


Attachments
gnu-classpath.patch (gnu-classpath.patch,367 bytes, patch)
2012-06-14 13:06 UTC, Maxim Kammerer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maxim Kammerer 2012-06-14 12:25:01 UTC
# emerge -qC virtual/jdk virtual/jre

>>> Unmerging virtual/jdk-1.6.0...
>>> Unmerging virtual/jre-1.6.0...


# emerge -pv jamvm

[nomerge       ] dev-java/jamvm-1.5.4-r2  USE="-debug -libffi" 
[ebuild  N     ]  dev-java/gnu-classpath-0.98-r3  USE="alsa gmp gstreamer gtk xml -debug -doc -dssi -examples -gconf -gjdoc -qt4" 0 kB
[ebuild  N    ~]   virtual/jre-1.5.0-r1  0 kB
[ebuild  N    ~]    dev-java/jamvm-1.5.4-r2  USE="-debug -libffi" 0 kB

Total: 3 packages (3 new), Size of downloads: 0 kB

 * Error: circular dependencies:

(dev-java/gnu-classpath-0.98-r3::gentoo, ebuild scheduled for merge) depends on
 (virtual/jre-1.5.0-r1::gentoo, ebuild scheduled for merge) (runtime)
  (dev-java/jamvm-1.5.4-r2::gentoo, ebuild scheduled for merge) (runtime)
   (dev-java/gnu-classpath-0.98-r3::gentoo, ebuild scheduled for merge) (buildtime)


This can be fixed by adding ">=virtual/jre-1.5" to PDEPEND instead of RDEPEND in gnu-classpath ebuild (gnu-classpath does not need JRE at build-time -- see bug #416819):

# emerge -q jamvm
>>> Verifying ebuild manifests
>>> Starting parallel fetch
>>> Emerging (1 of 4) virtual/jdk-1.6.0
>>> Installing (1 of 4) virtual/jdk-1.6.0
>>> Emerging (2 of 4) dev-java/gnu-classpath-0.98-r3
>>> Installing (2 of 4) dev-java/gnu-classpath-0.98-r3
>>> Emerging (3 of 4) dev-java/jamvm-1.5.4-r2
>>> Installing (3 of 4) dev-java/jamvm-1.5.4-r2
>>> Emerging (4 of 4) virtual/jre-1.5.0-r1
>>> Installing (4 of 4) virtual/jre-1.5.0-r1
Comment 1 Maxim Kammerer 2012-06-14 13:06:50 UTC
Created attachment 315299 [details, diff]
gnu-classpath.patch
Comment 2 Ralph Sennhauser (RETIRED) gentoo-dev 2012-06-14 13:43:28 UTC
gnu-classpath needs a jdk at build time which already provides a jre. Also RDEPEND is correct, PDEPEND only works if there are no reverse dependencies requiring the functionality added trough the availability of the package in PDEPEND. See jdom-jaxen for an example of how that can go wrong.

So all there is to this is, the resolver isn't clever enough and jamvm must be installed in two steps, same as with icedtea.

*** This bug has been marked as a duplicate of bug 382421 ***
Comment 3 Maxim Kammerer 2012-06-14 22:42:24 UTC
I see now that PDEPEND doesn't work well. However, what about a simpler solution than waiting for bug #382421 to resolve? The only reason that gnu-classpath RDEPENDs on virtual/jre is the scripts in /usr/gnu-classpath-0.98/bin. I suspect that these scripts are rarely necessary -- e.g., jamvm supplies its own scripts in /usr/lib/jamvm/bin.

I suggest separating installation of /usr/gnu-classpath-0.98/bin into a USE flag, say USE=tools. Should I open a separate enhancement request for that?
Comment 4 Maxim Kammerer 2012-06-15 11:07:53 UTC
Separate enhancement request filed: bug #421223.