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 E3048158009 for ; Wed, 28 Jun 2023 07:39:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 318BAE091C; Wed, 28 Jun 2023 07:39:00 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 142EEE091C for ; Wed, 28 Jun 2023 07:39:00 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2945E335CA6 for ; Wed, 28 Jun 2023 07:38:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B6CC1135 for ; Wed, 28 Jun 2023 07:38:57 +0000 (UTC) From: "Florian Schmaus" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Florian Schmaus" Message-ID: <1687936307.27eec8a39f8bcfac00a292667273cc60100cd97b.flow@gentoo> Subject: [gentoo-commits] proj/java:master commit in: eclass/ X-VCS-Repository: proj/java X-VCS-Files: eclass/gradle.eclass X-VCS-Directories: eclass/ X-VCS-Committer: flow X-VCS-Committer-Name: Florian Schmaus X-VCS-Revision: 27eec8a39f8bcfac00a292667273cc60100cd97b X-VCS-Branch: master Date: Wed, 28 Jun 2023 07:38:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f462dfcf-9828-42d1-a7ec-d4290e1380fa X-Archives-Hash: 8fdf150fb61f75bf837d53e36954f086 commit: 27eec8a39f8bcfac00a292667273cc60100cd97b Author: Florian Schmaus gentoo org> AuthorDate: Wed Jun 28 07:11:47 2023 +0000 Commit: Florian Schmaus gentoo org> CommitDate: Wed Jun 28 07:11:47 2023 +0000 URL: https://gitweb.gentoo.org/proj/java.git/commit/?id=27eec8a3 gradle.eclass: drop usage of compgen Bash's compgen builtin is only available if bash was built with readline support. And PMS does not require that this is the case. See also https://bugs.gentoo.org/909163 Signed-off-by: Florian Schmaus gentoo.org> eclass/gradle.eclass | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/eclass/gradle.eclass b/eclass/gradle.eclass index 070a3e12..7595923d 100644 --- a/eclass/gradle.eclass +++ b/eclass/gradle.eclass @@ -105,20 +105,14 @@ gradle-set_EGRADLE() { return fi - local candidates candidate selected selected_ver + local candidate selected selected_ver ver - candidates=$(compgen -c gradle-) - for candidate in ${candidates}; do - if [[ ! ${candidate} =~ gradle(-bin)?-([.0-9]+) ]]; then + for candidate in "${BROOT}"/usr/bin/gradle-; do + if [[ ${candidate} != */gradle?(-bin)-+([.0-9]) ]]; then continue fi - local ver - if (( ${#BASH_REMATCH[@]} == 3 )); then - ver="${BASH_REMATCH[2]}" - else - ver="${BASH_REMATCH[1]}" - fi + ver=${candidate##*-} if [[ -n ${EGRADLE_EXACT_VER} ]]; then ver_test "${ver}" -ne "${EGRADLE_EXACT_VER}" && continue @@ -150,7 +144,7 @@ gradle-set_EGRADLE() { done if [[ -z ${selected} ]]; then - die "Could not find (suitable) gradle installation in PATH" + die "Could not find (suitable) gradle installation in ${BROOT}/usr/bin" fi EGRADLE="${selected}"