From f720ce92435b126f65241d1497d1f53a8244494f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 16 Sep 2011 15:46:02 +0200 Subject: [PATCH] ++todo Signed-off-by: Nico Schottelius --- bin/cdist | 14 +++++++++----- doc/dev/todo/niconext | 8 ++++++++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/bin/cdist b/bin/cdist index e28a14c4..ee5b72c1 100755 --- a/bin/cdist +++ b/bin/cdist @@ -454,11 +454,13 @@ class Cdist: env['__global'] = self.out_dir # Legacy stuff to make cdist-type-emulator work - env['__cdist_conf_dir'] = self.conf_dir env['__cdist_core_dir'] = os.path.join(self.base_dir, "core") env['__cdist_local_base_dir'] = self.temp_dir env['__cdist_manifest'] = self.initial_manifest + # Submit information to new type emulator + env['__cdist_type_base_dir'] = self.type_base_dir + # Other environment stuff if extra_env: env.update(extra_env) @@ -636,17 +638,19 @@ def install(args): def emulator(): """Emulate type commands (i.e. __file and co)""" type = os.path.basename(sys.argv[0]) - + type_dir = os.environ['__cdist_type_base_dir'] parser = argparse.ArgumentParser(add_help=False) - print("Oh, noe") - sys.exit(1) - # Setup optional parameters + if os.path.isfile(os.path.join(type_dir, "parameter", "optional"): + __cdist_type_base_dir # Setup required parameters # Setup positional parameter, if not singleton + print("Oh, noe") + sys.exit(1) + def commandline(): diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index deab8801..3ec5ae96 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -22,6 +22,14 @@ - Remove man1/cdist-type-emulator.text - Remove the PATH=... part from the README + - basename(argv0) == type + - how to get to type dir? + - dependent on -c to cdist! + - submit via internal env! + - need to build parameter parser + - need to read file + - refactor list_object_requirements + - Allow manifest to be read from stdin - Create new video for cdist 2.0.0 http://www.youtube.com/watch?v=PRMjzy48eTI