From 861b13ffe48ae5ed5867ec9efd9f0fa92145fc71 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 14 Feb 2012 11:12:17 +0100 Subject: [PATCH] record sanitised object, not the user supplied one, as requirement Signed-off-by: Nico Schottelius --- lib/cdist/emulator.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/cdist/emulator.py b/lib/cdist/emulator.py index 687aee93..0979182a 100644 --- a/lib/cdist/emulator.py +++ b/lib/cdist/emulator.py @@ -145,10 +145,14 @@ class Emulator(object): if len(requirement) == 0: continue # Raises an error, if object cannot be created - self.cdist_object.object_from_name(requirement) + cdist_object = self.cdist_object.object_from_name(requirement) self.log.debug("Recording requirement: " + requirement) - self.cdist_object.requirements.append(requirement) + + # Save the sanitised version, not the user supplied one + # (__file//bar => __file/bar) + # This ensures pattern matching is done against sanitised list + self.cdist_object.requirements.append(cdist_object.name) def record_auto_requirements(self): """An object shall automatically depend on all objects that it defined in it's type manifest.