Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 955858 - dev-util/idea-community: Issue with openjdk Slot Specification
Summary: dev-util/idea-community: Issue with openjdk Slot Specification
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: Mike Pagano
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-12 00:15 UTC by Diogo Pinto
Modified: 2025-05-12 20:10 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 Diogo Pinto 2025-05-12 00:15:25 UTC
Hello,

I currently have OpenJDK 21.0.6 installed on my system, but the Idea package forces emerge to install version 17.

I have identified that this issue is related to the Slot specification in the DEPEND variable on lines 31 and 32:

DEPEND=”
  || (
    >=dev-java/openjdk-17.0.8.1_p1:17
    >=dev-java/openjdk-bin-17.0.8.1_p1:17
)”

emerge info:
Dependency resolution took 7.92 s (backtrack: 0/20).

[ebuild  N     ] dev-util/patchelf-0.18.0
[ebuild  NS    ] dev-java/openjdk-bin-17.0.14_p7 [21.0.6_p7]
[ebuild  N     ] dev-java/hawtjni-runtime-1.18  USE="-doc -source"
[ebuild  N     ] dev-java/jansi-native-1.8-r1  USE="-doc -source"
[ebuild  N    ~] dev-util/idea-community-2025.1.1.1  USE="wayland -experimental"

The Idea 2025 works up to OpenJDK version 24, so I see no problem in removing this specification or using a Slot operator, in my case it helped.

Thank you for your attention.
Comment 1 Volkmar W. Pogatzki 2025-05-12 07:32:30 UTC
(In reply to Diogo Pinto from comment #0)
> [...]
> The Idea 2025 works up to OpenJDK version 24, so I see no problem in
> removing this specification or using a Slot operator, in my case it helped.

Could you please also check with openjdk:25 (it is not yet keyworded but will get most probably after branching in June)?
Comment 2 Diogo Pinto 2025-05-12 09:22:19 UTC
I tried version 25 of OpenJDK, and it seems to work.

Since version 25 is not officially supported, even though it works, wouldn't it be better to restrict its use?

I tested the following restriction before OR, and it seemed effective:
!dev-java/openjdk:25
!dev-java/openjdk-bin:25 

.
Comment 3 Volkmar W. Pogatzki 2025-05-12 09:35:08 UTC
(In reply to Diogo Pinto from comment #2)
> I tried version 25 of OpenJDK, and it seems to work.
> 
> Since version 25 is not officially supported, even though it works, wouldn't
> it be better to restrict its use?
> 
> I tested the following restriction before OR, and it seemed effective:
> !dev-java/openjdk:25
> !dev-java/openjdk-bin:25 
> 
> .

openjdk:25 is the upcoming next LTS and it will be keyworded soon.

https://openjdk.org/projects/jdk/25/#Schedule

And I've never seen that kind of restriction for any jdk before.
Comment 4 Diogo Pinto 2025-05-12 10:15:17 UTC
(In reply to Volkmar W. Pogatzki from comment #3)
> And I've never seen that kind of restriction for any jdk before.

I took a look at the other packages, and using virtual/jdk is more common and easier to maintain.

DEPEND=">=virtual/jdk-17"

It solved this issue in the same way.
Comment 5 Diogo Pinto 2025-05-12 10:34:08 UTC
(In reply to Diogo Pinto from comment #4)
> (In reply to Volkmar W. Pogatzki from comment #3)
> > And I've never seen that kind of restriction for any jdk before.
> 
> I took a look at the other packages, and using virtual/jdk is more common
> and easier to maintain.
> 
> DEPEND=">=virtual/jdk-17"
> 
> It solved this issue in the same way.

This solved another issue.

If you didn't have OpenJDK installed, emerge installed both the openjdk-bin and openjdk-bin packages.
Note: This is the idea-community package without any modifications or fixes.

[ebuild  N    ~] dev-java/openjdk-bin-17.0.15_p6  USE="alsa cups -headless-awt (-selinux) -source"
[ebuild  N    ~] dev-java/openjdk-17.0.15_p6  USE="alsa cups jbootstrap (system-bootstrap) (-big-endian) -debug -doc -examples -headless-awt (-javafx) -lto (-selinux) -source -systemtap"
[ebuild  N    ~] dev-util/idea-community-2025.1.1.1  USE="wayland -experimental"

With only DEPEND=“>=virtual/jdk-17”, emerge only installs one of the packages:

[ebuild  N    ~] dev-java/openjdk-bin-21.0.7_p6  USE="alsa cups -headless-awt (-selinux) -source"
[ebuild  N     ] virtual/jdk-21  USE="-headless-awt"
[ebuild  N    ~] dev-util/idea-community-2025.1.1.1  USE="wayland -experimental"