From f2e589f2f80f8c1bf09530bb8847ab6ae3863da0 Mon Sep 17 00:00:00 2001 From: Matthias Stecher Date: Thu, 30 Jul 2020 09:54:30 +0200 Subject: [PATCH] Update reference manpage and add `$__type` to code-local To access the type library from `code-local`, it is required to have the `$__type` variable. Else, the type-specific library can not be accessed. --- cdist/core/code.py | 1 + docs/src/cdist-reference.rst.sh | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/cdist/core/code.py b/cdist/core/code.py index 05280aa5..0971072b 100644 --- a/cdist/core/code.py +++ b/cdist/core/code.py @@ -196,6 +196,7 @@ class Code: env = os.environ.copy() env.update(self.env) env.update({ + '__type': cdist_object.cdist_type.absolute_path, '__object': cdist_object.absolute_path, '__object_id': cdist_object.object_id, }) diff --git a/docs/src/cdist-reference.rst.sh b/docs/src/cdist-reference.rst.sh index c0ac2c3e..1c001893 100755 --- a/docs/src/cdist-reference.rst.sh +++ b/docs/src/cdist-reference.rst.sh @@ -253,6 +253,11 @@ __global Directory that contains generic output like explorer. Available for: initial manifest, type manifest, type gencode, shell. +__library + Directory that contains common code. + + Available for: initial manifest, type manifest, type gencode, code scripts, + global explorer, type explorer. __messages_in File to read messages from. @@ -301,11 +306,15 @@ __target_host_tags __type Path to the current type. - Available for: type manifest, type gencode. + Available for: type manifest, type gencode, local code. __type_explorer Directory that contains the type explorers. Available for: type explorer. +__type_library + Directory that contains type-specific common code. + + Available for: type explorer, code-remote. Environment variables (for writing) -----------------------------------