aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
diff options
context:
space:
mode:
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"
+}
+