When emerging dev-java/openjdk-bin-8.272_p10, I see: >>> Installing (32 of 36) dev-java/openjdk-bin-8.272_p10::gentoo * QA Notice: Symbolic link /home/anton/projects/gentoo/prefix/usr/lib/jvm/openjdk-bin-8 points to /opt/openjdk-bin-8.272_p10 which does not exist. !!! Error: Target "openjdk-bin-8" doesn't appear to be valid! exiting * openjdk-bin-8.272_p10 set as the default system-vm. * Updating .desktop files database ... And indeed, the symlink points incorrectly, and openjdk-bin is not actually set as the default system-vm. Reproducible: Always Steps to Reproduce: 1. ${PREFIX}/startprefix 2. emerge dev-java/openjdk-bin 3. ls -l ${PREFIX}/usr/lib/jvm/openjdk-bin-8 Actual Results: ${PREFIX}/usr/lib/jvm/openjdk-bin-8 -> /opt/openjdk-bin-8.272_p10 Expected Results: ${PREFIX}/usr/lib/jvm/openjdk-bin-8 -> ${PREFIX}/opt/openjdk-bin-8.272_p10 Workaround: 1. manually update the symlink 2. eselect java-vm set system openjdk-bin-8
Created attachment 670972 [details, diff] Proposed patch for eclass/java-vm-2.eclass I think the problem is in java-vm-2.eclass. When calling dosym, the eclass explicitly strips ${EPREFIX} from the target path. However, "Function Reference" [1] says about dosym: "Note that the target is interpreted verbatim; it needs to either specify a relative path or an absolute path including ${EPREFIX}." The patch works on my Prefix setup, but I did not have a chance to test it otherwise. [1] https://devmanual.gentoo.org/function-reference/install-functions/index.html
taking, moving prefix to CC. will take a look soon.
This issue also exists with dev-java/openjdk-8.272_p10, i.e. >>> Installing (4 of 4) dev-java/openjdk-8.272_p10::gentoo * QA Notice: Symbolic link /storage/strogdon/gentoo-rap/usr/lib/jvm/openjdk-8 points to /usr/lib64/openjdk-8 which does not exist. which indicates the problem is with eclass/java-vm-2.eclass.
(In reply to Georgy Yakovlev from comment #2) > taking, moving prefix to CC. > will take a look soon. Thanks Georgy.
I just run into this too with dev-java/openjdk-8.282_p08::gentoo.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cbf8f42ed31ea1379f44918327fa534da96c0d5c commit cbf8f42ed31ea1379f44918327fa534da96c0d5c Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2021-04-02 09:43:29 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2021-04-02 09:44:58 +0000 eclass/java-vm-2.eclass: fix symlinks on prefix. Closes: https://bugs.gentoo.org/751805 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> eclass/java-vm-2.eclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sorry for taking long, should be fine now.
Thank you, will check at next occasion. Do you think one could also simplify the symlinks, e.g. using 'symlinks -c' from app-misc/symlinks?