Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 177925 - binary JDK/JREs and revdep-rebuild - the solution
Summary: binary JDK/JREs and revdep-rebuild - the solution
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All Linux
: High normal
Assignee: Java team
URL:
Whiteboard:
Keywords:
: 119219 (view as bug list)
Depends on: 193979
Blocks: 83852 118531 119219 119622 138108 167773
  Show dependency tree
 
Reported: 2007-05-10 14:33 UTC by Vlastimil Babka (Caster) (RETIRED)
Modified: 2013-06-26 15:35 UTC (History)
4 users (show)

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 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-05-10 14:33:07 UTC
Tracking all bugs that are about revdep-rebuild and binary JRE/JDKs. If you know of any that I missed, please add.

I think we have two options:

a) remove the "broken linking" libraries from the JDK/JRE if respective USE flag is not set.
b) install revdep-rebuild control file with SEARCH_DIRS_MASK excluding the whole JDK/JRE directory.

I think b) is the right solution. Users trying to use the features without dependencies installed will get breakage in any way. Maybe I'm wrong but I think there's even more chance of breakage with the JDK/JRE library missing. Also if you see http://download.java.net/dlj/jdk/README.html#contents there are specified optional components that we don't need to install, and these libraries are not there, so removing them is probably violating the DLJ.

The solution doesn't need revbump, if someone's revdep-rebuild reinstalls a JDK/JRE, it gets the control file and won't be reinstalled no more.

Of course openjdk will probably be solved more elegantly.
Comment 1 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-05-11 09:08:14 UTC
So, on IRC we basically agreed on the b) solution with Betelgeuse. Needs java-vm-2.eclass additions:

- function for installing the control file
- function that processes USE vs IUSE for known stuff (X, alsa, odbc?, lpr?) and warns about the risk of missing deps, as sun-jdk does for X and lpr currently.

It's also good chance to re-evaluate what exactly is needed. For example jrockit-jdk-bin has nothing in RDEPEND.
Comment 2 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-12-16 22:13:07 UTC
(In reply to comment #1)
> - function for installing the control file

added java-vm_revdep-mask() function 

> - function that processes USE vs IUSE for known stuff (X, alsa, odbc?, lpr?)
> and warns about the risk of missing deps, as sun-jdk does for X and lpr
> currently.

Not done, because IUSE is not affected by package.use.mask and thus it's impossible to tell if use flag that's in IUSE but not true in 'use $flag' is disabled by the user or masked on given arch. Went with a generic warning that people should check their flags in the revdep-mask function.

> It's also good chance to re-evaluate what exactly is needed. For example
> jrockit-jdk-bin has nothing in RDEPEND.

Done in Sun, IBM, Blackdown JDK/JRE so far. Jrockit left, perhaps the emul stuff too.
Comment 3 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2008-04-19 14:39:10 UTC
*** Bug 119219 has been marked as a duplicate of this bug. ***
Comment 4 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2008-04-19 15:04:03 UTC
Jrockit and emul-linux done, closing.
Comment 5 Mattias Merilai 2013-06-25 14:03:43 UTC
Back again. Building

[ebuild   Rf  ] dev-java/oracle-jdk-bin-1.7.0.25  USE="fontconfig pax_kernel -X -alsa -derby -doc -examples -jce -nsplugin -source" 

without alsa-lib installed ends with

!!! existing preserved libs:
>>> package: media-libs/alsa-lib-1.0.26-r1
 *  - /usr/lib64/libasound.so.2
 *  - /usr/lib64/libasound.so.2.0.0
 *      used by /opt/oracle-jdk-bin-1.7.0.25/jre/lib/amd64/libgstplugins-lite.so (dev-java/oracle-jdk-bin-1.7.0.25)
 *      used by /opt/oracle-jdk-bin-1.7.0.25/jre/lib/amd64/libjsoundalsa.so (dev-java/oracle-jdk-bin-1.7.0.25)
Use emerge @preserved-rebuild to rebuild packages using these libraries

Of course on a server I'd prefer neither alsa installed nor portage (2.2.0_alpha184) screaming ;)