src/modules/java-vm.eselect.in has this code: VM_BASE="${EROOT}/usr/lib/jvm/" ... set_symlink() { ... ln -snf "${VM_BASE}/${target}" "${symlink}" ... that causes the target to be broken when installing into a root. $ emerge --root /tmp/foo dev-java/openjdk-bin then we see: $ ls -l /etc/java-config-2/current-system-vm lrwxrwxrwx 1 root root 33 Jun 2 15:36 /etc/java-config-2/current-system-vm -> /tmp/foo/usr/lib/jvm/openjdk-bin-11 the symlink target needs to use EPREFIX, not EROOT.
*** Bug 921973 has been marked as a duplicate of this bug. ***
Created attachment 891129 [details, diff] patch Here's a patch.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/eselect-java.git/commit/?id=0e67f002afa93cbea82e077931111acb1fddb3f4 commit 0e67f002afa93cbea82e077931111acb1fddb3f4 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2024-04-19 18:26:28 +0000 Commit: Florian Schmaus <flow@gentoo.org> CommitDate: 2024-04-20 11:28:28 +0000 java-vm.eselect: fix symlink target when ROOT is not / Bug: https://bugs.gentoo.org/793965 Signed-off-by: Mike Gilbert <floppym@gentoo.org> Signed-off-by: Florian Schmaus <flow@gentoo.org> src/modules/java-vm.eselect.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96f3d3c8939dbdf06c0e211d90729790898fca9e commit 96f3d3c8939dbdf06c0e211d90729790898fca9e Author: Florian Schmaus <flow@gentoo.org> AuthorDate: 2024-04-20 11:29:32 +0000 Commit: Florian Schmaus <flow@gentoo.org> CommitDate: 2024-04-20 11:30:35 +0000 app-eselect/eselect-java: add 0.5.1 Closes: https://bugs.gentoo.org/793965 Signed-off-by: Florian Schmaus <flow@gentoo.org> app-eselect/eselect-java/Manifest | 1 + app-eselect/eselect-java/eselect-java-0.5.1.ebuild | 35 ++++++++++++++++++++++ 2 files changed, 36 insertions(+)