From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id A94FB138C9D for ; Tue, 28 Apr 2015 23:47:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 56518E092E; Tue, 28 Apr 2015 23:47:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DE350E092E for ; Tue, 28 Apr 2015 23:47:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9A2BE340D39 for ; Tue, 28 Apr 2015 23:47:06 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C6F44977 for ; Tue, 28 Apr 2015 23:47:00 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1430264741.bc53f538039006f49bdcd19d3f17ab7f6b7a48d9.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/ebuild.sh bin/phase-functions.sh X-VCS-Directories: bin/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: bc53f538039006f49bdcd19d3f17ab7f6b7a48d9 X-VCS-Branch: master Date: Tue, 28 Apr 2015 23:47:00 +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-Archives-Salt: 07f4c909-5808-428b-83d9-4594b773f96c X-Archives-Hash: 9c7716ccc9c9a1c82a8a5341861aa7ac commit: bc53f538039006f49bdcd19d3f17ab7f6b7a48d9 Author: Zac Medico gentoo org> AuthorDate: Sun Apr 26 21:13:41 2015 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Apr 28 23:45:41 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=bc53f538 Make the USE variable readonly (bug 325009) This requires the EBUILD_FORCE_TEST code from dyn_test to execute before USE is declared readonly. X-Gentoo-Bug: 325009 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=325009 Acked-by: Brian Dolbec gentoo.org> bin/ebuild.sh | 10 +++++++++- bin/phase-functions.sh | 9 +-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/bin/ebuild.sh b/bin/ebuild.sh index b6b3723..4e26f87 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 PORTAGE_BIN_PATH="${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}" @@ -746,6 +746,14 @@ else declare -r ED EPREFIX EROOT fi + # If ${EBUILD_FORCE_TEST} == 1 and USE came from ${T}/environment + # then it might not have USE=test like it's supposed to here. + if [[ ${EBUILD_PHASE} == test && ${EBUILD_FORCE_TEST} == 1 && + test =~ ${PORTAGE_IUSE} ]] && ! has test ${USE} ; then + export USE="${USE} test" + fi + declare -r USE + if [[ -n $EBUILD_SH_ARGS ]] ; then ( # Don't allow subprocesses to inherit the pipe which diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh index 2743e27..7bf4d63 100644 --- a/bin/phase-functions.sh +++ b/bin/phase-functions.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # Hardcoded bash lists are needed for backward compatibility with @@ -489,13 +489,6 @@ __dyn_test() { elif [[ ${EBUILD_FORCE_TEST} != 1 ]] && ! has test ${FEATURES} ; then __vecho ">>> Test phase [not enabled]: ${CATEGORY}/${PF}" else - # If ${EBUILD_FORCE_TEST} == 1 and USE came from ${T}/environment - # then it might not have USE=test like it's supposed to here. - if [[ ${EBUILD_FORCE_TEST} == 1 && test =~ ${PORTAGE_IUSE} ]] && \ - ! has test ${USE} ; then - export USE="${USE} test" - fi - local save_sp=${SANDBOX_PREDICT} addpredict / __ebuild_phase pre_src_test