From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BF061159C96 for ; Sat, 27 Jul 2024 10:16:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D6314E2BD9; Sat, 27 Jul 2024 10:16:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8C2D8E2BD6 for ; Sat, 27 Jul 2024 10:16:48 +0000 (UTC) From: Florian Schmaus To: gentoo-dev@lists.gentoo.org Cc: Florian Schmaus Subject: [gentoo-dev] [PATCH] java-utils-2.eclass: select java-config binary, prefer java-config over java-config-2 Date: Sat, 27 Jul 2024 12:16:38 +0200 Message-ID: <20240727101638.81095-1-flow@gentoo.org> X-Mailer: git-send-email 2.44.2 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: ddc4667b-c36e-4e89-b18a-65f75f8a7d57 X-Archives-Hash: fbd230c96b864cd98ce8f61e574f47b1 This prepares the eclass for the transition from /usr/bin/java-config-2 to /usr/bin/java-config. Starting with dev-java/java-config-2.3.3, the java-config utility is installed as java-config and the java-config-2 compatibility symlink will only be installed if the 'compat' USE flag is enabled (currently the default). Signed-off-by: Florian Schmaus --- eclass/java-utils-2.eclass | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass index 8a062f2ad87e..559342068cc0 100644 --- a/eclass/java-utils-2.eclass +++ b/eclass/java-utils-2.eclass @@ -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 -- 2.44.2