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 87BDC158041 for ; Wed, 11 Jun 2025 03:26:34 +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) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 46923340E15 for ; Wed, 11 Jun 2025 03:26:34 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 279B71103DA; Wed, 11 Jun 2025 03:26:31 +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) server-digest SHA256) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 1BF581103DA for ; Wed, 11 Jun 2025 03:26:31 +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 CA81A33BEFF for ; Wed, 11 Jun 2025 03:26:30 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3E129206F for ; Wed, 11 Jun 2025 03:26:29 +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: <1749612375.3498e0f1c1fe6c7f23707d0e56462fbc8dfb487d.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/ecompress X-VCS-Directories: bin/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 3498e0f1c1fe6c7f23707d0e56462fbc8dfb487d X-VCS-Branch: master Date: Wed, 11 Jun 2025 03:26:29 +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: 8a48d77d-75a7-4d6f-a754-48e26cc57539 X-Archives-Hash: 1ec4fc30591ae43281d0a0cf4693abca commit: 3498e0f1c1fe6c7f23707d0e56462fbc8dfb487d Author: Kerin Millar plushkava net> AuthorDate: Mon Jun 9 08:53:27 2025 +0000 Commit: Sam James gentoo org> CommitDate: Wed Jun 11 03:26:15 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=3498e0f1 ecompress: always treat PORTAGE_COMPRESS as a discrete command name Recently, the guess_suffix() function was made to use the read builtin to safely split some of the words contained by the environment variables 'PORTAGE_COMPRESS' and 'PORTAGE_COMPRESS_FLAGS', like so. read -rd '' -a cmd <<<"${PORTAGE_COMPRESS} ${PORTAGE_COMPRESS_FLAGS}" However, to split the value of the former variable is improper. The status quo is that its value always be treated as the command name, meaning that it should not be split. Address this by splitting only the value of 'PORTAGE_COMPRESS_FLAGS'. Note that I am not designating this as a fix for my prior commit because the prior code was also incorrect in this respect. It was only upon studying ecompress-file - which properly quotes the expansion of 'PORTAGE_COMPRESS' - that this long-standing discrepancy became clear. See-also: a722142b8676a46c432e77133ec97d802edd1845 Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> bin/ecompress | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/ecompress b/bin/ecompress index 1169255674..2dc663bf44 100755 --- a/bin/ecompress +++ b/bin/ecompress @@ -118,7 +118,7 @@ do_queue() { guess_suffix() { local IFS f i tmpdir - local -a cmd + local -a args trap 'rm -rf -- "${tmpdir}"' RETURN @@ -133,8 +133,8 @@ guess_suffix() { printf '%s ' "${i}" || ! break done > compressme || return - read -rd '' -a cmd <<<"${PORTAGE_COMPRESS} ${PORTAGE_COMPRESS_FLAGS}" - "${cmd[@]}" compressme > /dev/null || return + read -rd '' -a args <<<"${PORTAGE_COMPRESS_FLAGS}" + "${PORTAGE_COMPRESS}" "${args[@]}" compressme > /dev/null || return # If PORTAGE_COMPRESS_FLAGS contains -k then we need to avoid # having our glob match the uncompressed file here.