Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 793965 - app-eselect/eselect-java: incorrect symlinks created when using ROOT
Summary: app-eselect/eselect-java: incorrect symlinks created when using ROOT
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 561272
  Show dependency tree
 
Reported: 2021-06-02 19:54 UTC by SpanKY
Modified: 2021-06-02 19:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.