Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 955858

Summary: dev-util/idea-community: Issue with openjdk Slot Specification
Product: Gentoo Linux Reporter: Diogo Pinto <gentoo>
Component: Current packagesAssignee: Mike Pagano <mpagano>
Status: UNCONFIRMED ---    
Severity: minor CC: gentoo, gentoo
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

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"
Comment 6 Larry the Git Cow gentoo-dev 2025-05-19 19:29:43 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc5a4d8f28bd08289b61da7d5402448a32c77a2e

commit bc5a4d8f28bd08289b61da7d5402448a32c77a2e
Author:     Mike Pagano <mpagano@gentoo.org>
AuthorDate: 2025-05-19 19:29:02 +0000
Commit:     Mike Pagano <mpagano@gentoo.org>
CommitDate: 2025-05-19 19:29:02 +0000

    dev-util/idea-community: Adjust JDK dependency
    
    Bug: https://bugs.gentoo.org/955858
    
    Signed-off-by: Mike Pagano <mpagano@gentoo.org>

 .../idea-community-2025.1.1.1-r1.ebuild            | 176 +++++++++++++++++++++
 1 file changed, 176 insertions(+)