From 4e3c0bbdf96000e102cbbaf7fd8af04ed90c4986 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 15 Mar 2010 00:25:57 +0000 Subject: Add a TODO note about adding a registration interface for eclasses to register phase hooks, in order to migrate away from global scope useq() calls. svn path=/main/trunk/; revision=15829 --- bin/ebuild.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'bin/ebuild.sh') diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 60c8f5e22..1e9f7dc3f 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -134,12 +134,13 @@ useq() { fi if [[ $EBUILD_PHASE = depend ]] ; then - # Skip this for older EAPIs since lots of ebuilds/eclasses - # have stuff in global scope that really belongs somewhere - # like pkg_setup or src_configure. - if [[ -n $EAPI ]] && ! hasq "$EAPI" 0 1 2 3 3_pre2 ; then - die "use() called during invalid phase: $EBUILD_PHASE" - fi + # TODO: Add a registration interface for eclasses to register + # any number of phase hooks, so that global scope eclass + # initialization can by migrated to phase hooks in new EAPIs. + # Example: add_phase_hook before pkg_setup $ECLASS_pre_pkg_setup + #if [[ -n $EAPI ]] && ! hasq "$EAPI" 0 1 2 3 ; then + # die "use() called during invalid phase: $EBUILD_PHASE" + #fi # Make sure we have this USE flag in IUSE elif [[ -n $PORTAGE_IUSE && -n $EBUILD_PHASE ]] ; then -- cgit v1.2.3-1-g7c22