Hello, I may be overlooking something:
System upgrader is presenting me with a package conflict:
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
warning: removing 'jre17-openjdk-17.0.10.u7-3' from target list because it conflicts with 'jdk17-openjdk-17.0.10.u7-3'
warning: removing 'jre17-openjdk-headless-17.0.10.u7-3' from target list because it conflicts with 'jdk17-openjdk-17.0.10.u7-3'
:: jdk17-openjdk-17.0.10.u7-3 and jre17-openjdk-17.0.10.u7-1 are in conflict. Remove jre17-openjdk? [y/N]
I canāt see whatās the conflict, since Java runtime and JDK seem to have updated fine so far:
It seems like the Arch maintainers have decided to backport the packaging method for JDK 21 to older versions.
Basically, jdk17-openjdk already provides the Java 17 runtime, so if you already have jdk17-openjdk installed, you donāt have to have jre17-openjdk installed as well.
This wasnāt the case previously. The maintainers have recently decided to change the way the openjdk toolchains are packaged in Arch. Thatās all there is to it.
This is quite simple to deal with:
If you are writing code in java, remove jre17-openjdk.
If you are not writing code in java and youāre only interested in running applications that are written in Java, remove jdk17-openjdk.
Since you already have jdk17-openjdk installed, Iām assuming that youāve been writing Java code. Therefore, choose option 1.
Hi Anthony, sorry Iām late with my reply to @anon26269396. So your and my response crossed in parts:
Actually, no.
Just before I asked that myself and therefore browsed pacman.log.
Iāve yet not seen any reason why I got the JDK installed.
But Iām using Logisim which needs a JRE v16 or newer.
So I just removed the JDK.
The Arch article, sammiev referred to, also says Iāve to decide whether I go with jreā¦-openjdk-headless or jreā¦-openjdk.
Since Logisim needs a GUI, Iād go with jre17-openjdk.
So I manually tried to remove jre17-openjdk-headless.
Since this is before v21 I get a dependency conflict:
$ sudo pacman -R jre17-openjdk-headless
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing jre17-openjdk-headless breaks dependency 'jre17-openjdk-headless=17.0.10.u7-1' required by jre17-openjdk
but a system upgrade suggests to delete jre17-openjdk-headless:
resolving dependencies...
looking for conflicting packages...
warning: removing 'jre17-openjdk-headless-17.0.10.u7-3' from target list because it conflicts with 'jre17-openjdk-17.0.10.u7-3'
:: jre17-openjdk-17.0.10.u7-3 and jre17-openjdk-headless-17.0.10.u7-1 are in conflict. Remove jre17-openjdk-headless? [y/N]
Which, to my logic, would also fail.
Of course I could remove jre17 all-together, but then pacman wouldnāt let me remove the JRE because of Logisim depending on it.
⦠which, actually, didnāt.
The upgrade worked now, by letting it remove the headless package.
I couldnāt find any āforceā (or similar) option for āpacman -Rā.
How would I replace the JRE v17 packages with newer ones?
I canāt just remove it because of dependencies to Logisim.
This is the latest dependency list for logisim as listed in its AUR page.
As you can see, the latest version of logisim requires java-runtime, which can be provided by either jdk17-openjdk or jre17-openjdk (any one of those packages listed inside the parenthesis will provide the java-runtime)
Rebuild logisim, and then remove jre17-openjdk when prompted to do so in your next update.
Ok, but installation requires me to decide between JDKs and not JREs:
$ yay -S logisim-evolution
:: There are 3 providers available for java-environment>=16:
:: Repository extra
1) jdk-openjdk 2) jdk17-openjdk 3) jdk21-openjdk
Enter a number (default=1):
==>
Like I mentioned already, everything inside the jre packages are now included inside the jdk packages. Just pick jdk17-openjdk in this case, since youāve been using Java 17.
Installing jdk17-openjdk would give you the most flexibility since it also provides tools for you to compile java code.
Then I donāt see why I would need to do anything now, since I got the original conflict resolved.
My idea is to upgrade to a JRE (I donāt need a JDK) v21 or newer, to set up my system to Archās new way to package JRE and JDK and therefore avoiding potential future conflicts.
I donāt seem to understand Archās dependency mechanism entirely:
Yes, now the JDK/JRE packages are kind of nested, but still - also with v22 - all sub packages (JRE, JRE-headless) are still available.
Is this still the AUR specifically requiring the JDK and not the JRE, and I was looking at the wrong place, or is this elsewhere in the system formulating this dependency?
*) pacman.log seems to confirm that the JDK came with the original installation of the AUR.
And back then the JRE was a dependency of the JDK, if I got this right.
No. logisim-evolution-bin only needs java-environment (provided by jdk-openjdk) during the build process. It doesnāt require java-environment to run.
Go to logisim-evolution-binās AUR page and read the list of dependencies. Youāll see that there is a (make) label beside the java-environment dependency. This means that java-environment is a make dependencency (only required during installation).
That is why I mentioned earlier to choose the jdk-openjdk variants for maximum flexibility.
With jre17-openjdk, you can only run java 17 code.
With jdk17-openjdk, you can run and compile java 17 code.
For your use case, Iād just remove jre17-openjdk and keep jdk17-openjdk. Itās really not that complicated.