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 ED6EF15807A for ; Thu, 05 Jun 2025 11:22:41 +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 D78B1343168 for ; Thu, 05 Jun 2025 11:22:41 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 643CF1102BE; Thu, 05 Jun 2025 11:22:18 +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 5A27A1102BE for ; Thu, 05 Jun 2025 11:22:18 +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 0DD4B343121 for ; Thu, 05 Jun 2025 11:22:18 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D3BDC2976 for ; Thu, 05 Jun 2025 11:22:14 +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: <1749122529.dd72b19880b7788843ae71a199f91043ce67c61d.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/phase-helpers.sh X-VCS-Directories: bin/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: dd72b19880b7788843ae71a199f91043ce67c61d X-VCS-Branch: master Date: Thu, 05 Jun 2025 11:22:14 +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: 7ecbb9ec-e5e3-468e-aa9e-b8aff4184849 X-Archives-Hash: f8860bba609d66051b50be8fbc8d0446 commit: dd72b19880b7788843ae71a199f91043ce67c61d Author: Kerin Millar plushkava net> AuthorDate: Tue Aug 9 02:56:53 2022 +0000 Commit: Sam James gentoo org> CommitDate: Thu Jun 5 11:22:09 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=dd72b198 phase-helpers.sh: use test -v instead of ${param:+set} Wherever there is a need to test whether a variable is set, employ the [[ -v name ]] command to do so. This is supported as of bash-4.2. Further, add a comment to the __eapi4_src_install() function, explaining why declare -p continues to be used there. Link: https://projects.gentoo.org/pms/4/pms.html#x1-10400010.1.9 Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> bin/phase-helpers.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh index f006aa92e0..918aaab75c 100644 --- a/bin/phase-helpers.sh +++ b/bin/phase-helpers.sh @@ -681,7 +681,7 @@ einstall() { libdir="${!libdir_var}" fi - if [[ -n "${libdir}" && "${CONF_PREFIX:+set}" = set ]]; then + if [[ "${libdir}" && -v CONF_PREFIX ]]; then local destlibdir="${D%/}/${CONF_PREFIX}/${libdir}" destlibdir="$(__strip_duplicate_slashes "${destlibdir}")" LOCAL_EXTRA_EINSTALL="libdir=${destlibdir} ${LOCAL_EXTRA_EINSTALL}" @@ -788,6 +788,10 @@ __eapi4_src_install() { emake DESTDIR="${D}" install fi + # To use declare -p determines whether a variable was declared but not + # whether it was set. Unfortunately, the language of EAPI 4 requires + # that it be this way. + # https://projects.gentoo.org/pms/4/pms.html#x1-10400010.1.9 if ! declare -p DOCS &>/dev/null ; then local d for d in README* ChangeLog AUTHORS NEWS TODO CHANGES \