aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-11-12 18:03:44 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-11-12 18:03:44 +0000
commitef1962094589a83f1300f04748fa4ef5abcba990 (patch)
treed2bde21a9701e5a65a779bd5ad60b4f837726cd9
parent60f7a0bd5384e5a0d89dcbf7266ae5ef656f81ef (diff)
downloadpaludis-ef1962094589a83f1300f04748fa4ef5abcba990.tar.gz
paludis-ef1962094589a83f1300f04748fa4ef5abcba990.tar.xz
Detect undefined exported exlib phases
Fixes: ticket:1036
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash5
1 files changed, 3 insertions, 2 deletions
diff --git a/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash b/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
index a26adc8..ef05b9d 100644
--- a/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
-# Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
+# Copyright (c) 2007, 2008, 2009, 2010 Ciaran McCreesh
# Copyright (c) 2009 Bo ├śrsted Andresen
#
# This file is part of the Paludis package manager. Paludis is free software;
@@ -26,7 +26,8 @@ export_exlib_phases()
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} \"\$@\" ; }"
+ eval "${e}() { type -t ${CURRENT_EXLIB}_${e} >/dev/null || \
+ die \"exported phase function ${CURRENT_EXLIB}_${e} does not exist\" ; ${CURRENT_EXLIB}_${e} \"\$@\" ; }"
done
}