Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 531786 - sys-apps/portage: poor handling of virtual/jdk+jre resolution
Summary: sys-apps/portage: poor handling of virtual/jdk+jre resolution
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on: 141118
Blocks: 155723
  Show dependency tree
 
Reported: 2014-12-06 10:09 UTC by Michał Górny
Modified: 2015-01-02 17:07 UTC (History)
2 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 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-12-06 10:09:47 UTC
Related: https://bugs.funtoo.org/browse/FL-1219

The idea is that you have three ebuilds:

virtual/jre-1.7.0: || ( =dev-java/oracle-jre-bin-1.7.0* =virtual/jdk-1.7* )
virtual/jdk-1.7.0: || ( =dev-java/oracle-jdk-bin-1.7.0* ... )
app-office/test-1: DEPEND=virtual/jdk RDEPEND=virtual/jre

So pretty much the Gentoo virtuals with ordering changed to prefer Oracle. Now, if you emerge app-office/test, portage gives you:

[ebuild  N     ] app-office/test-1 
[ebuild  N     ]  virtual/jdk-1.7.0-r1 
[ebuild  N     ]   dev-java/oracle-jdk-bin-1.7.0.72  USE="X alsa fontconfig nsplugin (-aqua) -derby -doc -examples -jce -pax_kernel (-selinux) -source" 
[ebuild  N     ]  virtual/jre-1.7.0-r1 
[ebuild  N     ]   dev-java/oracle-jre-bin-1.7.0.72  USE="X alsa nsplugin -fontconfig -jce -pax_kernel (-selinux)" 
[ebuild  N     ]    app-admin/eselect-java-0.1.0 
[ebuild  N     ]    dev-java/java-config-2.2.0-r1000  PYTHON_ABIS="2.7 3.3 -2.6 -3.1 -3.2 -3.4 (-3.5)" 
[ebuild  N     ]     dev-java/java-config-wrapper-0.16 
[ebuild  N     ]     sys-apps/baselayout-java-0.1.0 

which is kinda unnecessary, since oracle-jdk-bin can satisfy virtual/jre via virtual/jdk, and I think we have some code already to assume virtuals are zero-cost.

Worse than that, if I inline the virtual in virtual/jre, i.e.:

virtual/jre-1.7.0: || ( =dev-java/oracle-jre-bin-1.7.0* =dev-java/oracle-jdk-bin-1.7.0* ... )
virtual/jdk-1.7.0: || ( =dev-java/oracle-jdk-bin-1.7.0* ... )

Portage behaves the same even though oracle-jdk-bin is a common subset of the two virtuals.