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

Bug 793965

Summary: app-eselect/eselect-java: incorrect symlinks created when using ROOT
Product: Gentoo Linux Reporter: SpanKY <vapier>
Component: Current packagesAssignee: Java team <java>
Status: CONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 561272    

Description SpanKY gentoo-dev 2021-06-02 19:54:48 UTC
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.