Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: bin/
Date: Tue, 28 Apr 2015 23:47:10
Message-Id: 1430264741.bc53f538039006f49bdcd19d3f17ab7f6b7a48d9.zmedico@gentoo
1 commit: bc53f538039006f49bdcd19d3f17ab7f6b7a48d9
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 26 21:13:41 2015 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Tue Apr 28 23:45:41 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=bc53f538
7
8 Make the USE variable readonly (bug 325009)
9
10 This requires the EBUILD_FORCE_TEST code from dyn_test to execute
11 before USE is declared readonly.
12
13 X-Gentoo-Bug: 325009
14 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=325009
15 Acked-by: Brian Dolbec <dolsen <AT> gentoo.org>
16
17 bin/ebuild.sh | 10 +++++++++-
18 bin/phase-functions.sh | 9 +--------
19 2 files changed, 10 insertions(+), 9 deletions(-)
20
21 diff --git a/bin/ebuild.sh b/bin/ebuild.sh
22 index b6b3723..4e26f87 100755
23 --- a/bin/ebuild.sh
24 +++ b/bin/ebuild.sh
25 @@ -1,5 +1,5 @@
26 #!/bin/bash
27 -# Copyright 1999-2013 Gentoo Foundation
28 +# Copyright 1999-2015 Gentoo Foundation
29 # Distributed under the terms of the GNU General Public License v2
30
31 PORTAGE_BIN_PATH="${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"
32 @@ -746,6 +746,14 @@ else
33 declare -r ED EPREFIX EROOT
34 fi
35
36 + # If ${EBUILD_FORCE_TEST} == 1 and USE came from ${T}/environment
37 + # then it might not have USE=test like it's supposed to here.
38 + if [[ ${EBUILD_PHASE} == test && ${EBUILD_FORCE_TEST} == 1 &&
39 + test =~ ${PORTAGE_IUSE} ]] && ! has test ${USE} ; then
40 + export USE="${USE} test"
41 + fi
42 + declare -r USE
43 +
44 if [[ -n $EBUILD_SH_ARGS ]] ; then
45 (
46 # Don't allow subprocesses to inherit the pipe which
47
48 diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
49 index 2743e27..7bf4d63 100644
50 --- a/bin/phase-functions.sh
51 +++ b/bin/phase-functions.sh
52 @@ -1,5 +1,5 @@
53 #!/bin/bash
54 -# Copyright 1999-2013 Gentoo Foundation
55 +# Copyright 1999-2015 Gentoo Foundation
56 # Distributed under the terms of the GNU General Public License v2
57
58 # Hardcoded bash lists are needed for backward compatibility with
59 @@ -489,13 +489,6 @@ __dyn_test() {
60 elif [[ ${EBUILD_FORCE_TEST} != 1 ]] && ! has test ${FEATURES} ; then
61 __vecho ">>> Test phase [not enabled]: ${CATEGORY}/${PF}"
62 else
63 - # If ${EBUILD_FORCE_TEST} == 1 and USE came from ${T}/environment
64 - # then it might not have USE=test like it's supposed to here.
65 - if [[ ${EBUILD_FORCE_TEST} == 1 && test =~ ${PORTAGE_IUSE} ]] && \
66 - ! has test ${USE} ; then
67 - export USE="${USE} test"
68 - fi
69 -
70 local save_sp=${SANDBOX_PREDICT}
71 addpredict /
72 __ebuild_phase pre_src_test