Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 926308 - java-pkg-2.eclass: minimal value of source / target should be set in a central place instead in the ebuild
Summary: java-pkg-2.eclass: minimal value of source / target should be set in a centra...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-07 07:45 UTC by Volkmar W. Pogatzki
Modified: 2024-03-07 09:21 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 Volkmar W. Pogatzki 2024-03-07 07:45:19 UTC
Since java 21 we often receive the warnings:
"source value 8 is obsolete and will be removed in a future release"
"target value 8 is obsolete and will be removed in a future release"

Presently these values are handled in the ebuild by setting:
DEPEND=">=virtual/jdk-1.8:*"
RDEPEND=">=virtual/jre-1.8:*"

Whenever a new java version in ::gentoo drops a source / target value these ebuild settings need to be updated.
For java 11 we had to update from 1.5 [1]
For java 17 we had to update from 1.6
For java 21 we had to update from 1.7
Soon we'll have to update from 1.8

In order to avoid such unnecessary updates these values should be set in a central place, overwritable in the ebuild.

[1] https://marc.info/?l=gentoo-dev&m=161838633318104
Comment 1 Miroslav Šulc gentoo-dev 2024-03-07 08:22:33 UTC
this would handle only part of the issue. the other part is that a change in eclass won't trigger rebuild of all affected ebuilds to generate bytecode with a higher version. that's why we need to bump all the ebuilds manually, to trigger the rebuild. at least i don't know about any other way.
Comment 2 Volkmar W. Pogatzki 2024-03-07 09:21:13 UTC
Guess an important part in the game is 'eselect java' and each java version has its own set of source / target values supported. 
Not sure, do (or could?) we set source / target according to the (e)selected system-vm?

SOURCE and TARGET are registered in package.env for each package.
Could these values be evaluated when changing the system-vm to trigger the rebuild?

This is more questions than answers, I know.