diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-08-07 12:50:08 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-08-07 12:50:08 +0000 |
commit | d9b7de771efda8e7e27ac462a57b0a0b40b89674 (patch) | |
tree | f38ebedc0708d88179008bb8d229ff004937c4f4 /bin | |
parent | a2f0fbf76c63abc482a6e6586670327aa9ac4585 (diff) | |
download | portage-d9b7de771efda8e7e27ac462a57b0a0b40b89674.tar.gz portage-d9b7de771efda8e7e27ac462a57b0a0b40b89674.tar.bz2 portage-d9b7de771efda8e7e27ac462a57b0a0b40b89674.zip |
Add support in EAPI 2_pre2 for a function named "default" is redefined for
each phase so that it will call the default_* function corresponding to the
current phase. Thanks to Thomas Anderson <gentoofan23> for the initial
patch.
svn path=/main/trunk/; revision=11342
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ebuild.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh index fe9adc02c..b7612a384 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -1373,12 +1373,21 @@ source_all_bashrcs() { [[ $(type -t src_configure) = function ]] || \ src_configure() { _default_src_configure "$@" ; } + default() { + _default_${EBUILD_PHASE} + } + else for x in $default_phases ; do eval "default_$x() { die \"default_$x() is not supported with EAPI='$EAPI'\" }" done + + default() { + die "default() is not supported with EAPI='$EAPI'" + } + fi local OCC="${CC}" OCXX="${CXX}" |