Incoming changes in JDK / JRE 21 packages may require manual intervention

Other package which have no problem have as dependency

Depends On      : java-environment

or

Depends On                    : java-runtime

elasticsearch has

Depends On                    : jre-openjdk-headless  libxml2

It is nicely documented here: https://wiki.archlinux.org/title/Java_package_guidelines#Dependencies

3.3 Dependencies

Java packages might specify java-runtime or java-environment as dependency, based on what they need.

For most packages, java-runtime is what is needed to simply run software written in Java.

java-environment (e.g. JDK) is needed by packages that will need to compile Java source code into bytecode.

See Java for more information.

1 Like

That is exactly the problem. There are many out in AURs which set jdk-openjdk OR jre-openjdk(-headless) explicitly and that results in unsolveable conflicts. I will report to the maintainers for every package which is impacted. Thanks for testing!

This approach is what work for me. The others not.

sudo pacman -S jdk-openjdk
Endeavour ask to uninstall jre-openjdk Endeavour ask to uninstall jre-openjdk headless
Package (3) Old Version New Version Net Change Download Size

jre-openjdk 21.u35-3 -0.58 MiB
jre-openjdk-headless 21.u35-3 -192.59 MiB
extra/jdk-openjdk 21.u35-3 21.u35-8 827.49 MiB 457.46 MiB

Total Download Size: 457.46 MiB
Total Installed Size: 1136.47 MiB
Net Upgrade Size: 634.32 MiB

:: Proceed with installation? [Y/n]

Perfect response, happen just like bax84 say.

Just saw, that the maintainer of elasticsearch has reacted promptly to your request.

Depends On                    : java-runtime  libxml2

This is a good sign and means that the maintainer cares about things. :smile:

Yes - he only can react if we give feedbacks. I am also a coder and I am always lucky about issue reports. Nobody can watch everything.

1 Like

I have to admit that I don’t know how to find all packages which depend on a specifc other package (like jdk-openjdk or jre-openjdk).

Ah, I should probably watch these forums more often. I’ve got netbeans and intellij installed and wondered why I had conflicts when updating.

My fix: I removed netbeans and intellig, then both the JRE and JDK. I then Installed the new JDK (I think mine was v17 before the updates), then netbeans and intellij. All is working fine. To be honest, I always thought the dev kit contained the runtime anyway? It used to anyway (back in my Windows days :grimacing:)…

No experience myself, but I found [1]. Perhaps of use for you?

[1]

2 Likes

Thank you for this! I noticed the problem, but was procrastinating in fixing the conflict.

Thanks for the link. Not exactly what I want but at least this

pacman -Qi | grep -E 'Depends On|Name' | grep -B 1 -E 'Depends On.*PACKAGE_X.*' | \
grep Name | awk -F ':' '{print $2}'

this shows all installed packages which depend on PACKAGE

PACKAGE_X is an example of a package name. You have to replce PACKAGE_X with the name of the package you’re looking for.

1 Like

Of course I did.

But what I wanted was to find all the packages in the ARCH and AUR repos which depend on PACKAGE_X, where PACKAGE_X is for example jdk-openjdk

Aah, ok. It seems I can replace pacman -Qi with pacman -Si

Oh, in the repos.

Well, you could use pacman -Sii jdk-openjdk for the repos. Off the top of my head I don’t know if there is an equivalent for the AUR.

EDIT - ha, we posted at the same time.

I don’t see any possibility to get this for all available AUR packages

You can use the REST-API to get those:

$ curl "https://aur.archlinux.org/rpc/v5/search/jdk-openjdk?by=depends"

It returns a JSON response with the findings. If you’re just interested in the names, use jq to extract those:

$ curl -s "https://aur.archlinux.org/rpc/v5/search/jdk-openjdk?by=depends" | jq -r '.results.[].Name'

For more info, see https://wiki.archlinux.org/title/Aurweb_RPC_interface

4 Likes