aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Bo ├śrsted Andresen <zlin@exherbo.org> 2011-10-03 01:00:28 +0000
committerAvatar Bo ├śrsted Andresen <bo.andresen@zlin.dk> 2011-10-04 20:19:07 +0200
commit95c707052672c0f772355e9a1dad22989d656d40 (patch)
treec71c0ce62c16e71e4448871322d57bc3506ab8a4
parent269259dd03f9b096aebf8027b4e139f32e18b71d (diff)
downloadpaludis-95c707052672c0f772355e9a1dad22989d656d40.tar.gz
paludis-95c707052672c0f772355e9a1dad22989d656d40.tar.xz
Die in require() on exported exlib phases which don't get defined.
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash7
1 files changed, 7 insertions, 0 deletions
diff --git a/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash b/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
index 2511913..911b662 100644
--- a/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
@@ -28,6 +28,7 @@ export_exlib_phases()
fi
eval "${e}() { type -t ${CURRENT_EXLIB}_${e} >/dev/null || \
die \"exported phase function ${CURRENT_EXLIB}_${e} does not exist\" ; ${CURRENT_EXLIB}_${e} \"\$@\" ; }"
+ PALUDIS_CHECK_EXPORTED_PHASES+=" ${CURRENT_EXLIB}_${e}"
done
}
@@ -263,6 +264,12 @@ require()
has ${v} ${!a_v} || die "${CURRENT_EXLIB}.exlib takes no ${v} parameter"
done
+ # die on exported exlib phases which don't get defined
+ for v in ${PALUDIS_CHECK_EXPORTED_PHASES} ; do
+ type -t ${v} >/dev/null || die "exported phase function ${v} does not exist"
+ done
+ unset PALUDIS_CHECK_EXPORTED_PHASES
+
export CURRENT_EXLIB="${old_CURRENT_EXLIB}"
if [[ -n ${CURRENT_EXLIB} ]]; then
alias exparam="exparam_internal ${CURRENT_EXLIB}"