aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-04-27 18:35:07 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-04-27 18:35:07 +0100
commit23138200aca0fa30d285c7b5cf84db69498c1238 (patch)
tree27f60f359eba34eba5d6eddfff829b9c4416c331 /paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
parenta950df5854eef2dc6286deec2931d0d68f9a7b92 (diff)
downloadpaludis-23138200aca0fa30d285c7b5cf84db69498c1238.tar.gz
paludis-23138200aca0fa30d285c7b5cf84db69498c1238.tar.xz
illegal_in_global_scope
Diffstat (limited to 'paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash')
-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 769a9cd..fc690e3 100644
--- a/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
@@ -231,3 +231,10 @@ default()
die "default_$(paludis_phase_to_function_name "${!PALUDIS_EBUILD_PHASE_VAR}") is not a function"
default_$(paludis_phase_to_function_name "${!PALUDIS_EBUILD_PHASE_VAR}") "$@"
}
+
+illegal_in_global_scope()
+{
+ [[ "${!PALUDIS_EBUILD_PHASE_VAR}" == "metadata" ]] \
+ && die "Exheres bug: ${FUNCNAME[1]} must not be called in global scope"
+}
+