Move the ebuild sourcing code into a new _source_ebuild() function.
authorZac Medico <zmedico@gentoo.org>
Thu, 30 Apr 2009 07:00:23 +0000 (07:00 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 30 Apr 2009 07:00:23 +0000 (07:00 -0000)
(trunk r13299)

svn path=/main/branches/2.1.6/; revision=13470

bin/ebuild.sh
bin/isolated-functions.sh

index d1e2e8fd035bd7aec6702516f9a6c3d7577039c3..74a848a35e8a178277fa836fe5756cf00010f79e 100755 (executable)
@@ -1802,11 +1802,7 @@ if ! hasq "$EBUILD_PHASE" clean cleanrm depend && \
        unset PORTAGE_SANDBOX_ON
 fi
 
-if ! hasq "$EBUILD_PHASE" clean cleanrm ; then
-if [[ $EBUILD_PHASE = depend || ! -f $T/environment || \
-       -f $PORTAGE_BUILDDIR/.ebuild_changed ]] || \
-       hasq noauto $FEATURES ; then
-
+_source_ebuild() {
        # The bashrcs get an opportunity here to set aliases that will be expanded
        # during sourcing of ebuilds and eclasses.
        source_all_bashrcs
@@ -1845,7 +1841,14 @@ if [[ $EBUILD_PHASE = depend || ! -f $T/environment || \
 
        # This needs to be exported since prepstrip is a separate shell script.
        [[ -n $QA_PRESTRIPPED ]] && export QA_PRESTRIPPED
-fi
+}
+
+if ! hasq "$EBUILD_PHASE" clean cleanrm ; then
+       if [[ $EBUILD_PHASE = depend || ! -f $T/environment || \
+               -f $PORTAGE_BUILDDIR/.ebuild_changed ]] || \
+               hasq noauto $FEATURES ; then
+               _source_ebuild
+       fi
 fi
 
 # Set default EAPI if necessary, so that most
index 9abfc308a98e06899123c8539756543379498fef..ccef19ed222e73834330654b19a534401f759fd9 100755 (executable)
@@ -518,6 +518,7 @@ save_ebuild_env() {
                        source_all_bashrcs ebuild_main \
                        ebuild_phase ebuild_phase_with_hooks \
                        _ebuild_arg_to_phase _ebuild_phase_funcs default \
+                       _source_ebuild \
                        ${QA_INTERCEPTORS}
 
                # portage config variables and variables set directly by portage