From 6fc1597faf12d4dbf6e015fc70626131e08900a3 Mon Sep 17 00:00:00 2001
From: Zac Medico <zmedico@gentoo.org>
Date: Sun, 10 Aug 2008 09:04:58 +0000
Subject: [PATCH] Move the default EAPI definition where it will work in any
 case it might be necessary, such as after loading an exising environment.

svn path=/main/trunk/; revision=11387
---
 bin/ebuild.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 704148ef3..68536ee82 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -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
 
-- 
2.26.2