aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-08-10 16:17:29 +0100
committerAvatar David Leverton <levertond@googlemail.com> 2008-08-10 16:17:29 +0100
commit50eefb0b6b3cefe9b9c6ed1f90d355c6440a4802 (patch)
tree28020f3e171122ab9261fd6c8cfe0d6b1388a7e8 /paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
parent301564093f2dd20128be8f2033ec517412738b02 (diff)
downloadpaludis-50eefb0b6b3cefe9b9c6ed1f90d355c6440a4802.tar.gz
paludis-50eefb0b6b3cefe9b9c6ed1f90d355c6440a4802.tar.xz
Keep a list of phase functions for each EAPI, instead of hard-coding it in various places.
Diffstat (limited to 'paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash')
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash17
1 files changed, 4 insertions, 13 deletions
diff --git a/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash b/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
index d78de73..034ea8f 100644
--- a/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
@@ -22,19 +22,10 @@ export_exlib_phases()
local e
for e in "$@" ; do
- case "$e" in
- pkg_nofetch|pkg_setup|pkg_prerm|pkg_postrm|pkg_preinst|pkg_postinst|pkg_config|pkg_pretend|pkg_info)
- eval "${e}() { ${CURRENT_EXLIB}_${e} \"\$@\" ; }"
- ;;
-
- src_unpack|src_prepare|src_configure|src_compile|src_install|src_test)
- eval "${e}() { ${CURRENT_EXLIB}_${e} \"\$@\" ; }"
- ;;
-
- *)
- die "$e should not be in export_exlib_phases for ${CURRENT_EXLIB}"
- ;;
- esac
+ if [[ "${e}" == builtin_* ]] || ! has "${e}" ${PALUDIS_EBUILD_FUNCTIONS}; then
+ die "$e should not be in export_exlib_phases for ${CURRENT_EXLIB}"
+ fi
+ eval "${e}() { ${CURRENT_EXLIB}_${e} \"\$@\" ; }"
done
}