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: Mon, 02 May 2011 17:58:35
Message-Id: e5977579376dd124bb341263f73a5d302dbc0863.zmedico@gentoo
1 commit: e5977579376dd124bb341263f73a5d302dbc0863
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 2 17:56:51 2011 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Mon May 2 17:56:51 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e5977579
7
8 ebuild.sh: make INHERITED independent of phase
9
10 When EBUILD_PHASE != depend, INHERITED comes pre-initialized
11 from cache. In order to make INHERITED content independent of
12 EBUILD_PHASE during inherit() calls, we unset INHERITED after
13 we make a backup copy for QA checks.
14
15 ---
16 bin/ebuild.sh | 14 +++++++++++---
17 1 files changed, 11 insertions(+), 3 deletions(-)
18
19 diff --git a/bin/ebuild.sh b/bin/ebuild.sh
20 index 6593755..b610342 100755
21 --- a/bin/ebuild.sh
22 +++ b/bin/ebuild.sh
23 @@ -1359,7 +1359,7 @@ inherit() {
24 # This is disabled in the *rm phases because they frequently give
25 # false alarms due to INHERITED in /var/db/pkg being outdated
26 # in comparison the the eclasses from the portage tree.
27 - if ! hasq $ECLASS $INHERITED; then
28 + if ! hasq $ECLASS $INHERITED $__INHERITED_QA_CACHE ; then
29 eqawarn "QA Notice: ECLASS '$ECLASS' inherited illegally in $CATEGORY/$PF $EBUILD_PHASE"
30 fi
31 fi
32 @@ -2023,11 +2023,18 @@ if ! hasq "$EBUILD_PHASE" clean cleanrm ; then
33 # during sourcing of ebuilds and eclasses.
34 source_all_bashrcs
35
36 + # When EBUILD_PHASE != depend, INHERITED comes pre-initialized
37 + # from cache. In order to make INHERITED content independent of
38 + # EBUILD_PHASE during inherit() calls, we unset INHERITED after
39 + # we make a backup copy for QA checks.
40 + __INHERITED_QA_CACHE=$INHERITED
41 +
42 # *DEPEND and IUSE will be set during the sourcing of the ebuild.
43 # In order to ensure correct interaction between ebuilds and
44 # eclasses, they need to be unset before this process of
45 # interaction begins.
46 - unset DEPEND RDEPEND PDEPEND IUSE REQUIRED_USE
47 + unset DEPEND RDEPEND PDEPEND INHERITED IUSE REQUIRED_USE \
48 + ECLASS E_IUSE E_REQUIRED_USE E_DEPEND E_RDEPEND E_PDEPEND
49
50 if [[ $PORTAGE_DEBUG != 1 || ${-/x/} != $- ]] ; then
51 source "$EBUILD" || die "error sourcing ebuild"
52 @@ -2057,7 +2064,8 @@ if ! hasq "$EBUILD_PHASE" clean cleanrm ; then
53 PDEPEND="${PDEPEND} ${E_PDEPEND}"
54 REQUIRED_USE="${REQUIRED_USE} ${E_REQUIRED_USE}"
55
56 - unset ECLASS E_IUSE E_REQUIRED_USE E_DEPEND E_RDEPEND E_PDEPEND
57 + unset ECLASS E_IUSE E_REQUIRED_USE E_DEPEND E_RDEPEND E_PDEPEND \
58 + __INHERITED_QA_CACHE
59
60 # alphabetically ordered by $EBUILD_PHASE value
61 case "$EAPI" in