-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] fix the openjdk alternatives mess #47866
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I think this is a great idea. |
classabbyamp
force-pushed
the
jdk-alts
branch
3 times, most recently
from
December 22, 2023 02:34
182ef2f
to
02b3c09
Compare
classabbyamp
force-pushed
the
jdk-alts
branch
2 times, most recently
from
December 22, 2023 20:03
3969b77
to
2511df5
Compare
get rid of the openjdk profile hook. it should not have been done like this.
Replaces the xbps trigger that added the profile script for openjdk, which was really a mistake. Instead of using alternative groups for specific JRE/JDK binaries, use two symlinks: /usr/lib/jvm/default-jdk and /usr/lib/jvm/default-jre, which point to /usr/lib/jvm/${version}. Prefer default-jdk to default-jre, and just add them to PATH and MANPATH instead of putting things in /usr/bin.
- various template cleanups - rename /usr/lib/jvm/java-1.8-openjdk to /usr/lib/jvm/openjdk8 for consistency - fix manpages - fix alternatives
this package has been useless since 106a275 make it a transitional package on openjdk11
- fix manpages - fix alternatives
- fix manpages - fix alternatives
classabbyamp
force-pushed
the
jdk-alts
branch
from
December 22, 2023 22:05
2511df5
to
dceac46
Compare
zen0bit
pushed a commit
to oSoWoSo/VUR
that referenced
this pull request
Jan 10, 2024
removed in 46371e7 prevents this old, removed package from borking the new alternatives groups introduced in void-linux#47866 by replacing it if a user has this installed and selected as the alternative for the java group, it can make the profile script not run because /usr/lib/jvm/default-jre doesn't exist.
zen0bit
pushed a commit
to oSoWoSo/VUR
that referenced
this pull request
Jan 11, 2024
removed in 46371e7 prevents this old, removed package from borking the new alternatives groups introduced in void-linux#47866 by replacing it if a user has this installed and selected as the alternative for the java group, it can make the profile script not run because /usr/lib/jvm/default-jre doesn't exist.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current way the alternatives groups work for openjdk packages really sucks. They overlap and cause pkgdb errors, can get out-of-sync, and more. This approach hopes to fix (or at least improve) that.
The new package
openjdk-common
replaces the xbps trigger that added the profile script for openjdk (which was a flawed approach and should have never been done).Instead of using alternative groups for specific JRE/JDK binaries, this approach uses just two symlinks,
/usr/lib/jvm/default-jdk
and/usr/lib/jvm/default-jre
, which point to the selectedJAVA_HOME
(/usr/lib/jvm/openjdkN
). The profile script inopenjdk-common
prefersdefault-jdk
todefault-jre
, and just adds them toPATH
andMANPATH
instead of putting things in/usr/bin
.With this approach, the selected JDK and JRE can probably still get out of sync, but the preference behaviour of the profile script should help mitigate this. I don't think it's currently possible to sanely deconflict/sync the alternatives groups.
Testing the changes
[ci skip]