From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BCF51138350 for ; Fri, 21 Feb 2020 06:35:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B1C63E084A; Fri, 21 Feb 2020 06:35:23 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 91D20E084A for ; Fri, 21 Feb 2020 06:35:23 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B5F0734EED9 for ; Fri, 21 Feb 2020 06:35:20 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E0AF1116 for ; Fri, 21 Feb 2020 06:35:18 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1582205253.42fe7eadad8c80836ace0de527e988383f63b7da.ulm@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: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 42fe7eadad8c80836ace0de527e988383f63b7da X-VCS-Branch: master Date: Fri, 21 Feb 2020 06:35:18 +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: 3d729194-22fa-4dd8-ae45-dc437c22402c X-Archives-Hash: 3e1099478e4a6e82acd433384e47e33a commit: 42fe7eadad8c80836ace0de527e988383f63b7da Author: Ulrich Müller gentoo org> AuthorDate: Thu Feb 20 13:04:34 2020 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Thu Feb 20 13:27:33 2020 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=42fe7ead einstalldocs: Fix test for DOCS being unset. The current test does not exactly test for unset DOCS, because it also evaluates as true if the variable has attributes. Such attributes can be defined even for an unset variable. Therefore test the output of declare -p for presence of an = sign instead, which indicates that a value has been assigned to the variable (bug 710076 comment #2). PMS reference: Algorithm 12.4, line 7: https://projects.gentoo.org/pms/7/pms.html#x1-135011r183 See also bash upstream discussion: https://lists.gnu.org/archive/html/bug-bash/2020-02/msg00045.html Closes: https://bugs.gentoo.org/710076 Signed-off-by: Ulrich Müller gentoo.org> bin/phase-helpers.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh index 3deb28c68..9495465f9 100644 --- a/bin/phase-helpers.sh +++ b/bin/phase-helpers.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 if ___eapi_has_DESTTREE_INSDESTTREE; then @@ -953,7 +953,7 @@ fi if ___eapi_has_einstalldocs; then einstalldocs() { ( - if ! declare -p DOCS &>/dev/null ; then + if [[ $(declare -p DOCS 2>/dev/null) != *=* ]]; then local d for d in README* ChangeLog AUTHORS NEWS TODO CHANGES \ THANKS BUGS FAQ CREDITS CHANGELOG ; do