aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-26 23:56:46 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-26 23:56:46 +0000
commit9f06751cfa50d7ec739346645c01702825412fb9 (patch)
treefbc74c23d968f2edf0e8753c62b1ee90d88b2929
parent6295d4483484c63557795890270a466b26190396 (diff)
downloadpaludis-9f06751cfa50d7ec739346645c01702825412fb9.tar.gz
paludis-9f06751cfa50d7ec739346645c01702825412fb9.tar.xz
EXPORT_FUNCTIONS sanity checking
-rw-r--r--ebuild/eclass_functions.bash15
1 files changed, 14 insertions, 1 deletions
diff --git a/ebuild/eclass_functions.bash b/ebuild/eclass_functions.bash
index b799b3c..8435c95 100644
--- a/ebuild/eclass_functions.bash
+++ b/ebuild/eclass_functions.bash
@@ -27,7 +27,20 @@ EXPORT_FUNCTIONS()
local e
for e in "$@" ; do
- eval "$1() { ${ECLASS}_${e} \"\$@\" ; }"
+ case "$e" in
+ pkg_setup|pkg_prerm|pkg_postrm|pkg_preinst|pkg_postinst)
+ eval "$1() { ${ECLASS}_${e} \"\$@\" ; }"
+ ;;
+
+ src_unpack|src_compile|src_install|src_test)
+ eval "$1() { ${ECLASS}_${e} \"\$@\" ; }"
+ ;;
+
+ *)
+ eval "$1() { ${ECLASS}_${e} \"\$@\" ; }"
+ echo "[EBUILD QA]: $e should not be in EXPORT_FUNCTIONS" 1>&2
+ ;;
+ esac
done
}