Move the default EAPI definition where it will work in any case it might
authorZac Medico <zmedico@gentoo.org>
Sun, 10 Aug 2008 09:04:58 +0000 (09:04 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 10 Aug 2008 09:04:58 +0000 (09:04 -0000)
be necessary, such as after loading an exising environment.

svn path=/main/trunk/; revision=11387

bin/ebuild.sh

index 704148ef351af196c85ad6f9d8ee4c6d0af97c29..68536ee827fb3bcc506553b945bd14215a7f1b95 100755 (executable)
@@ -1873,10 +1873,6 @@ if ! hasq ${EBUILD_PHASE} clean && \
                debug-print "RDEPEND: not set... Setting to: ${DEPEND}"
        fi
 
-       # Set default EAPI if necessary, so that most
-       # code can simply assume that it's defined.
-       [[ -n $EAPI ]] || EAPI=0
-
        # add in dependency info from eclasses
        IUSE="${IUSE} ${E_IUSE}"
        DEPEND="${DEPEND} ${E_DEPEND}"
@@ -1887,6 +1883,10 @@ if ! hasq ${EBUILD_PHASE} clean && \
        set +f
 fi
 
+# Set default EAPI if necessary, so that most
+# code can simply assume that it's defined.
+[[ -n $EAPI ]] || EAPI=0
+
 # enable bashrc support for the clean phase
 [[ ${EBUILD_PHASE} == clean ]] && source_all_bashrcs