From cbefa5b473fc37f63c26bdf6433693077f875188 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 29 Jul 2024 07:15:34 +0000 Subject: [PATCH] eclass/java-utils-2: Sync with Gentoo It's from Gentoo commit 7eddfd1f9b69da3a97fb5b6b3781a6a31feaa59a. --- .../portage-stable/eclass/java-utils-2.eclass | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/java-utils-2.eclass b/sdk_container/src/third_party/portage-stable/eclass/java-utils-2.eclass index 91f8fba879..559342068c 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/java-utils-2.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/java-utils-2.eclass @@ -1838,7 +1838,7 @@ ejunit_() { local junit=${1} shift 1 - local cp=$(java-pkg_getjars --with-dependencies ${junit}${pkgs}) + local cp=$(java-pkg_getjars --build-only --with-dependencies ${junit}${pkgs}) if [[ ${1} = -cp || ${1} = -classpath ]]; then cp="${2}:${cp}" shift 2 @@ -2723,7 +2723,13 @@ java-pkg_build-vm-from-handle() { fi for vm in ${JAVA_PKG_WANT_BUILD_VM}; do - if java-config-2 --select-vm=${vm} 2>/dev/null; then + local java_config + for java_config in java-config{,-2}; do + type -p ${java_config} >/dev/null && break + done + [[ -z ${java_config} ]] && die "No java-config binary in PATH" + + if ${java_config} --select-vm=${vm} 2>/dev/null; then echo ${vm} return 0 fi