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 369DA15807A for ; Sat, 07 Jun 2025 22:55:25 +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 216BE3430E4 for ; Sat, 07 Jun 2025 22:55:25 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 3247C1104BE; Sat, 07 Jun 2025 22:54:50 +0000 (UTC) Received: from smtp.gentoo.org (mail.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 2323F1104BD for ; Sat, 07 Jun 2025 22:54:50 +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 CEC9034310D for ; Sat, 07 Jun 2025 22:54:49 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1C2462822 for ; Sat, 07 Jun 2025 22:54:47 +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: <1749336855.e052b52fc6b7b2e9bba5fb4bfcec463eb324e445.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: e052b52fc6b7b2e9bba5fb4bfcec463eb324e445 X-VCS-Branch: master Date: Sat, 07 Jun 2025 22:54:47 +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: c01c9fe4-083a-4901-8a2b-fb035728a899 X-Archives-Hash: ed5aeeac7e0fe5b19285bd42f68a8f7e commit: e052b52fc6b7b2e9bba5fb4bfcec463eb324e445 Author: Kerin Millar plushkava net> AuthorDate: Sat Jun 7 18:23:44 2025 +0000 Commit: Sam James gentoo org> CommitDate: Sat Jun 7 22:54:15 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e052b52f ecompress: render the control flow of fix_symlinks() clear Clarify the control flow of the fix_symlinks() function by reducing the extent to which the || control operator is used. Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> bin/ecompress | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/ecompress b/bin/ecompress index e77347eed5..490fd8d345 100755 --- a/bin/ecompress +++ b/bin/ecompress @@ -143,10 +143,12 @@ fix_symlinks() { target1=$(readlink -- "${link}") target2=${target1}${PORTAGE_COMPRESS_SUFFIX} - if [[ "${target2}" == /* ]] ; then - [[ -f "${D%/}${target2}" ]] || continue - else - [[ -f "${link%/*}/${target2}" ]] || continue + if [[ ${target2} == /* ]]; then + if [[ ! -f ${D%/}${target2} ]]; then + continue + fi + elif [[ ! -f ${link%/*}/${target2} ]]; then + continue fi something_changed=1