dev-java/openjdk-jre-bin-11.0.14_p9 is installed in /opt/openjdk-jre-bin-11/ per its ebuild: local dest="/opt/${PN}-${SLOT}" Meanwhile, while executing java-vm_install-env, the file files/openjdk-jre-bin-11.env.sh is used as environment which sets JAVA_HOME to ${EPREFIX}/opt/${P}. Thus, a dangling symlink is created at /usr/lib/jvm/openjdk-jre-bin-11, pointing to /opt/openjdk-jre-bin-11.0.14_p9 instead of real installation path /opt/openjdk-jre-bin-11/. The installation path changed between dev-java/openjdk-jre-bin-11.0.14_p9 and dev-java/openjdk-jre-bin-11.0.13_p8 where it was consistent. Reproducible: Always Steps to Reproduce: 1. Install dev-java/openjdk-jre-bin-11.0.14_p9 2. Run command # eselect java-vm list Available Java Virtual Machines: [1] openjdk-jre-bin-11 3. Run command # eselect java-vm set system openjdk-jre-bin-11 !!! Error: Target "openjdk-jre-bin-11" doesn't appear to be valid! exiting Actual Results: The eselect java-vm set system openjdk-jre-bin-11 failed to run with error !!! Error: Target "openjdk-jre-bin-11" doesn't appear to be valid! Expected Results: The command should succeed as the VM exists Portage 3.0.30 (python 3.9.9-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-11.2.0, glibc-2.33-r7, 5.16.3-gentoo x86_64) ================================================================= System uname: Linux-5.16.3-gentoo-x86_64-AMD_Ryzen_7_5700G_with_Radeon_Graphics-with-glibc2.33 KiB Mem: 65283620 total, 417924 free KiB Swap: 67108860 total, 66771596 free Timestamp of repository gentoo: Sun, 20 Feb 2022 10:46:13 +0000 Head commit of repository gentoo: 7c804e708681d29cb793c52aacd7458e2d8f0852 sh bash 5.1_p16 ld GNU ld (Gentoo 2.37_p1 p2) 2.37 app-misc/pax-utils: 1.3.3::gentoo app-shells/bash: 5.1_p16::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.34.0-r6::gentoo dev-lang/python: 3.9.9-r1::gentoo dev-lang/rust: 1.58.1::gentoo dev-util/cmake: 3.22.2::gentoo dev-util/meson: 0.60.3::gentoo sys-apps/baselayout: 2.7-r3::gentoo sys-apps/openrc: 0.44.10::gentoo sys-apps/sandbox: 2.25::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.71-r1::gentoo sys-devel/automake: 1.16.4::gentoo sys-devel/binutils: 2.37_p1-r2::gentoo sys-devel/binutils-config: 5.4::gentoo sys-devel/clang: 13.0.0::gentoo sys-devel/gcc: 11.2.0::gentoo sys-devel/gcc-config: 2.5-r1::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/lld: 13.0.0::gentoo sys-devel/llvm: 13.0.0::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.15-r3::gentoo (virtual/os-headers) sys-libs/glibc: 2.33-r7::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: git sync-uri: git://anongit.gentoo.org/repo/sync/gentoo.git priority: -1000 sync-git-verify-commit-signature: true perso location: /var/db/repos/perso masters: gentoo plex-overlay location: /var/lib/layman/plex-overlay sync-type: laymansync sync-uri: https://github.com/comio/plex-overlay.git masters: gentoo priority: 50 steam-overlay location: /var/lib/layman/steam-overlay sync-type: laymansync sync-uri: https://github.com/anyc/steam-overlay.git masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/var/tmp/portage/.distfiles" EMERGE_DEFAULT_OPTS="--quiet-build --with-bdeps=y --keep-going --autounmask-keep-masks" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-march=native -O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-march=native -O2 -pipe" GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ http://gentoo.mirrors.ovh.net/gentoo-distfiles/" LANG="fr_FR.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="fr en" MAKEOPTS="-j17" PKGDIR="/var/cache/binpkgs" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" SHELL="/bin/bash" USE="X a52 aac acl acoustid acpi activities alsa amd64 amr apng avif branding bzip2 cairo cdda cddb cdr chm cli crypt cups curl dbus declarative device-mapper djvu dri dts dv dvb dvd dvdr elogind encode epub exif fbcon ffmpeg flac fontconfig fortran gdbm gegl gif gpm gstreamer gtk gui heif http2 iconv icu imlib iproute2 ipv6 jpeg jpeg2k kde kipi lcms libass libglvnd libnotify libtirpc lz4 lzma lzo mad mikmod mms mng mp3 mp4 mpeg mtp multilib musicbrainz ncurses nls nptl ogg opencl opengl openmp openssl opus osmesa pam pango pcre pdf plasma png policykit ppds pulseaudio qml qt5 rar raw readline realtime sdl seccomp speex spell split-usr ssl startup-notification svg taglib theora tiff truetype udev udisks unicode upower usb v4l vaapi vdpau vim-syntax vnc vorbis vpx vulkan webp widgets wmf wxwidgets x264 x265 xattr xcb xinerama xml xv xvid zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2020" ALSA_CARDS="hda-intel virmidi usb-audio" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" CAMERAS="fuji ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev libinput" KERNEL="linux" L10N="fr en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
I have the same problem: >>> Installing (1 of 1) dev-java/openjdk-jre-bin-11.0.14_p9::gentoo * QA Notice: Symbolic link /usr/lib/jvm/openjdk-jre-bin-11 points to /opt/openjdk-jre-bin-11.0.14_p9 which does not exist. !!! Error: Target "openjdk-jre-bin-11" doesn't appear to be valid! exiting * openjdk-jre-bin-11.0.14_p9 set as the default system-vm. * Updating .desktop files database ... [ ok ] >>> Auto-cleaning packages... >>> No outdated packages were found on your system. * GNU info directory index is up-to-date. paolo@mediacenter ~ $ symlinks /usr/lib/jvm/ dangling: /usr/lib/jvm/openjdk-jre-bin-11 -> /opt/openjdk-jre-bin-11.0.14_p9
I can reproduce this as well. Same error messages as comment 1 I also found that /usr/share/java-config-2/vm/openjdk-jre-bin-11 contains references to /opt/openjdk-jre-bin-11.0.14_p9 (which doesn't exist)
Do you guys think it is safe to create /opt/openjdk-jre-bin-11.0.14_p9 as a symlink pointing to the real installation path, or will it require manual cleanup after this is fixed or the ebuild is updated?
I can also confirm this: $ eselect java-vm show Current system-vm openjdk-bin-11 Current user-vm (unset) $ eselect java-vm list Available Java Virtual Machines: [1] openjdk-bin-11 system-vm [2] openjdk-jre-bin-11 $ eselect java-vm set user 2 !!! Error: Target "2" doesn't appear to be valid! exiting $ symlinks /usr/lib/jvm absolute: /usr/lib/jvm/openjdk-bin-11 -> /opt/openjdk-bin-11.0.14_p9 dangling: /usr/lib/jvm/openjdk-jre-bin-11 -> /opt/openjdk-jre-bin-11.0.14_p9 $ eix -I openjdk [I] dev-java/openjdk-bin Available versions: (8) 8.312_p07^s ~8.312_p07-r1^s 8.322_p06^s (11) 11.0.13_p8 ~11.0.13_p8-r1 11.0.14_p9-r1 (16) ~16.0.1_p9[1] (17) 17.0.1_p12-r1 17.0.2_p8 {alsa cups examples +gentoo-vm headless-awt selinux source} Installed versions: 11.0.14_p9-r1(11)(13:08:48 02/02/22)(alsa cups -headless-awt -selinux -source) 17.0.2_p8(17)(13:09:03 02/02/22)(alsa cups -gentoo-vm -headless-awt -selinux -source) Homepage: https://adoptium.net Description: Prebuilt Java JDK binaries provided by Eclipse Temurin [I] dev-java/openjdk-jre-bin Available versions: (8) 8.312_p07-r1 8.322_p06 (11) 11.0.14_p9 {alsa cups +gentoo-vm headless-awt selinux} Installed versions: 11.0.14_p9(11)(21:56:23 02/19/22)(alsa cups gentoo-vm -headless-awt -selinux) Homepage: https://adoptopenjdk.net Description: Prebuilt Java JRE binaries provided by Eclipse Temurin $ emerge --info dev-java/openjdk-jre-bin Unavailable repository 'guru' referenced by masters entry in '/var/lib/layman/SwordArMor/metadata/layout.conf' Portage 3.0.30 (python 3.9.11-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-11.2.1, glibc-2.34-r10, 5.4.179-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-5.4.179-gentoo-x86_64-Intel-R-_Core-TM-_i7-7600U_CPU_@_2.80GHz-with-glibc2.34 KiB Mem: 32752200 total, 6786180 free KiB Swap: 32813020 total, 32813020 free Timestamp of repository gentoo: Sun, 24 Apr 2022 18:18:11 +0000 Head commit of repository gentoo: f52daf63c1e97cca50d3420bca11de52b0670d85 Timestamp of repository SwordArMor: 1 sh bash 5.1_p16 ld GNU ld (Gentoo 2.37_p1 p2) 2.37 ccache version 4.5.1 [disabled] app-misc/pax-utils: 1.3.3::gentoo app-shells/bash: 5.1_p16::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.34.0-r9::gentoo dev-lang/python: 2.7.18_p14::gentoo, 3.9.11::gentoo, 3.10.3::gentoo dev-lang/rust: 1.59.0::gentoo dev-util/ccache: 4.5.1::gentoo dev-util/cmake: 3.22.2::gentoo dev-util/meson: 0.60.3::gentoo sys-apps/baselayout: 2.7-r3::gentoo sys-apps/openrc: 0.44.10::gentoo sys-apps/sandbox: 2.29::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.71-r1::gentoo sys-devel/automake: 1.13.4-r2::gentoo, 1.16.5::gentoo sys-devel/binutils: 2.37_p1-r2::gentoo sys-devel/binutils-config: 5.4.1::gentoo sys-devel/clang: 13.0.1::gentoo sys-devel/gcc: 11.2.1_p20220115::gentoo sys-devel/gcc-config: 2.5-r1::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/lld: 13.0.1::gentoo sys-devel/llvm: 13.0.1::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.15-r3::gentoo (virtual/os-headers) sys-libs/glibc: 2.34-r10::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: git sync-uri: https://github.com/gentoo-mirror/gentoo.git priority: -1000 localrepo location: /var/db/repos/localrepo masters: gentoo SwordArMor location: /var/lib/layman/SwordArMor masters: gentoo priority: 50 haskell location: /var/lib/layman/haskell masters: gentoo priority: 50 jorgicio location: /var/lib/layman/jorgicio masters: gentoo priority: 50 science location: /var/lib/layman/science masters: gentoo priority: 50 torbrowser location: /var/lib/layman/torbrowser masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=skylake -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.8/conf" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=skylake -O2 -pipe" DISTDIR="/var/cache/distfiles" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-march=skylake -O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-march=skylake -O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="de_DE.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="de en fr nb es" MAKEOPTS="-j2" PKGDIR="/var/cache/binpkgs" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" SHELL="/bin/bash" USE="X a52 aac acl acpi activities alsa amd64 bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus declarative dri dts dvd dvdr elogind encode exif flac fortran gdbm gif gpm gtk gui iconv icu ipv6 jpeg kde kwallet lcms libglvnd libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf plasma png policykit ppds pulseaudio qml qt5 readline sdl seccomp semantic-desktop spell split-usr ssl startup-notification svg tiff truetype udev udisks unicode upower usb vorbis widgets wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2020" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de de-DE en-CA en-GB fr-CA fr nb es-ES es" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS ================================================================= Package Settings ================================================================= dev-java/openjdk-jre-bin-11.0.14_p9::gentoo was built with the following: USE="alsa cups gentoo-vm -headless-awt (-selinux)" ABI_X86="(64)"
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3586e009d595162f554b22eee043d8ed73ad57b8 commit 3586e009d595162f554b22eee043d8ed73ad57b8 Author: Florian Schmaus <flow@gentoo.org> AuthorDate: 2022-04-25 06:50:41 +0000 Commit: Florian Schmaus <flow@gentoo.org> CommitDate: 2022-04-25 06:50:41 +0000 dev-java/openjdk-jre-bin: fix JAVA_HOME in vm env file Closes: https://bugs.gentoo.org/833796 Signed-off-by: Florian Schmaus <flow@gentoo.org> dev-java/openjdk-jre-bin/files/openjdk-jre-bin-11.env.sh | 6 +++--- ...e-bin-11.0.14_p9.ebuild => openjdk-jre-bin-11.0.14_p9-r1.ebuild} | 0 2 files changed, 3 insertions(+), 3 deletions(-)