From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 finch.gentoo.org (Postfix) with ESMTPS id 2DF2F15807A for ; Thu, 05 Jun 2025 11:22:27 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (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) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 1A7EF34312F for ; Thu, 05 Jun 2025 11:22:27 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id BBCB6110497; Thu, 05 Jun 2025 11:22:16 +0000 (UTC) Received: from smtp.gentoo.org (dev.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)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id B650F110497 for ; Thu, 05 Jun 2025 11:22:16 +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 6F664343129 for ; Thu, 05 Jun 2025 11:22:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AA2BD290D for ; Thu, 05 Jun 2025 11:22:13 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1749122525.4c91986e5fce707aa2bd1cd6fb6a912bb152179c.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/isolated-functions.sh X-VCS-Directories: bin/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 4c91986e5fce707aa2bd1cd6fb6a912bb152179c X-VCS-Branch: master Date: Thu, 05 Jun 2025 11:22:13 +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: 5af92ee0-e645-4101-b507-3583afcc3044 X-Archives-Hash: 4060b3475981b0b33adb3d19c7aeea86 commit: 4c91986e5fce707aa2bd1cd6fb6a912bb152179c Author: Kerin Millar plushkava net> AuthorDate: Mon Jun 2 10:11:48 2025 +0000 Commit: Sam James gentoo org> CommitDate: Thu Jun 5 11:22:05 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=4c91986e isolated-functions.sh: store the MAKETOPTS-parsing ERE in a variable Store the extended regular expression used for parsing MAKEOPTS in a variable. While there is no compelling technical reason to do so, it does make for a slightly more pleasant viewing and editing experience. Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> bin/isolated-functions.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index fefc0d2ab7..35b0e1cd2c 100644 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -494,9 +494,11 @@ if [[ -z ${XARGS} ]] ; then fi ___makeopts_jobs() { - local jobs + local ere jobs - if [[ " ${MAKEOPTS} " =~ .*[[:space:]](-[^j]*j[[:space:]]*|--jobs(=|[[:space:]]+))([0-9]+)[[:space:]] ]]; then + ere='.*[[:space:]](-[^j]*j[[:space:]]*|--jobs(=|[[:space:]]+))([0-9]+)[[:space:]]' + + if [[ " ${MAKEOPTS} " =~ $ere ]]; then jobs=${BASH_REMATCH[3]} elif jobs=$({ getconf _NPROCESSORS_ONLN || sysctl -n hw.ncpu; } 2>/dev/null); then :