Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r13598 - main/trunk/bin
Date: Sat, 02 May 2009 22:34:12
Message-Id: E1M0Nmc-0005w2-1o@stork.gentoo.org
1 Author: zmedico
2 Date: 2009-05-02 22:34:09 +0000 (Sat, 02 May 2009)
3 New Revision: 13598
4
5 Modified:
6 main/trunk/bin/ebuild.sh
7 Log:
8 Make useq() die if called during the "depend" phase in newer EAPIs.
9
10
11 Modified: main/trunk/bin/ebuild.sh
12 ===================================================================
13 --- main/trunk/bin/ebuild.sh 2009-05-02 22:14:44 UTC (rev 13597)
14 +++ main/trunk/bin/ebuild.sh 2009-05-02 22:34:09 UTC (rev 13598)
15 @@ -141,12 +141,16 @@
16 found=1
17 fi
18
19 + if [[ $EBUILD_PHASE = depend ]] ; then
20 + # Skip this for older EAPIs since lots of ebuilds/eclasses
21 + # have stuff in global scope that really belongs somewhere
22 + # like pkg_setup or src_configure.
23 + if [[ -n $EAPI ]] && ! hasq "$EAPI" 0 1 2 ; then
24 + die "use() called during invalid phase: $EBUILD_PHASE"
25 + fi
26 +
27 # Make sure we have this USE flag in IUSE
28 - # Skip this during the "depend" phase because lots of ebuilds/eclasses
29 - # have stuff in global scope that really belongs somewhere like pkg_setup
30 - # or src_configure.
31 - if [[ -n $PORTAGE_IUSE && -n $EBUILD_PHASE && \
32 - $EBUILD_PHASE != depend ]] ; then
33 + elif [[ -n $PORTAGE_IUSE && -n $EBUILD_PHASE ]] ; then
34 [[ $u =~ $PORTAGE_IUSE ]] || \
35 eqawarn "QA Notice: USE Flag '${u}' not" \
36 "in IUSE for ${CATEGORY}/${PF}"