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 3DC2B15807A for ; Fri, 06 Jun 2025 22:02:23 +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 1F05C342F94 for ; Fri, 06 Jun 2025 22:02:23 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 200051102BE; Fri, 06 Jun 2025 22:02:22 +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 bobolink.gentoo.org (Postfix) with ESMTPS id 12DA41102BE for ; Fri, 06 Jun 2025 22:02:22 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BA155342F94 for ; Fri, 06 Jun 2025 22:02:21 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2BB1082C for ; Fri, 06 Jun 2025 22:02:20 +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: <1749247336.c53f2d7aee038cba983c312a12738a58e6eed5a1.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: c53f2d7aee038cba983c312a12738a58e6eed5a1 X-VCS-Branch: master Date: Fri, 06 Jun 2025 22:02:20 +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: aa37daf8-8b13-4a00-9cde-7708dfa2e935 X-Archives-Hash: 08789d522ccdd1d45a6514e984614b52 commit: c53f2d7aee038cba983c312a12738a58e6eed5a1 Author: Kerin Millar plushkava net> AuthorDate: Fri Jun 6 14:01:45 2025 +0000 Commit: Sam James gentoo org> CommitDate: Fri Jun 6 22:02:16 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=c53f2d7a isolated-functions.sh: correctly handle bundled -j options in MAKEOPTS Recently, the extended regular expression that is used to parse -j and --jobs out of MAKEOPTS was adjusted so as to handle some edge cases. Yet, I inadvertently introduced a regression by employing [^j] to match short options preceding a bundled -j option. Of course, it should be [A-Ia-iK-Zk-z] and acted upon with the C/POSIX collation in effect. The resulting regular expression is as follows. .*[[:space:]] ( # short options other than -j, if any, leading up to -j, # optionally followed by whitespace -[A-Ia-iK-Zk-z]*j[[:space:]]* | # --jobs followed by either = or whitespace --jobs(=|[[:space:]]+) ) ([0-9]+) # the job count ... [[:space:]] # which must not have any trailing garbage Fixes: 91f7b072c851e69abefafed1b43902772fb4058c Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> bin/isolated-functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index 7760ba717f..b35fc7e926 100644 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -494,9 +494,9 @@ if [[ -z ${XARGS} ]] ; then fi ___makeopts_jobs() { - local ere jobs + local LC_ALL LC_COLLATE=C ere jobs - ere='.*[[:space:]](-[^j]*j[[:space:]]*|--jobs(=|[[:space:]]+))([0-9]+)[[:space:]]' + ere='.*[[:space:]](-[A-Ia-iK-Zk-z]*j[[:space:]]*|--jobs(=|[[:space:]]+))([0-9]+)[[:space:]]' if [[ " ${MAKEOPTS} " =~ $ere ]]; then jobs=$(( 10#${BASH_REMATCH[3]} ))