From 74300ab38ec83be2366a4962e19460f013dddd1c Mon Sep 17 00:00:00 2001
From: Steven Armstrong <steven@icarus.ethz.ch>
Date: Thu, 13 Oct 2011 16:52:06 +0200
Subject: [PATCH] set __cdist_manifest for use in type emulator

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
---
 lib/cdist/core/manifest.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/cdist/core/manifest.py b/lib/cdist/core/manifest.py
index 8d7f6e36..c1d6b7f0 100644
--- a/lib/cdist/core/manifest.py
+++ b/lib/cdist/core/manifest.py
@@ -83,6 +83,7 @@ class Manifest(object):
         return self.local.run_script(script, env=env)
 
     def run_type_manifest(self, cdist_object):
+        script = os.path.join(self.local.type_path, cdist_object.type.manifest_path)
         env = os.environ.copy()
         env.update(self.env)
         env.update({
@@ -90,6 +91,6 @@ class Manifest(object):
             '__object_id': cdist_object.object_id,
             '__object_fq': cdist_object.path,
             '__type': cdist_object.type.absolute_path,
+            '__cdist_manifest': script,
         })
-        script = os.path.join(self.local.type_path, cdist_object.type.manifest_path)
         return self.local.run_script(script, env=env)