From 20bb4d044b6162bc11cd035829f64e6562f644a5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 20 Sep 2011 13:29:08 +0200 Subject: [PATCH 1/7] --typo: .realines( vs. readlines( Signed-off-by: Nico Schottelius --- bin/cdist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist b/bin/cdist index 5ce947ef..1f44ba2d 100755 --- a/bin/cdist +++ b/bin/cdist @@ -684,7 +684,7 @@ def emulator(): sys.exit(1) else: param_fd = open(file, "r") - param_old = param_fd.realines() + param_old = param_fd.readlines() param_fd.close() if(param_old != param): From e3849b917c29cf6a86241a1fb2b1403e28b5def5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 20 Sep 2011 14:34:19 +0200 Subject: [PATCH 2/7] ++todo Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 84745512..9e9ca0e7 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -13,6 +13,10 @@ - Fix / rewrite cdist-quickstart +- write tutorial!!!!!!!!! + - like ccollect! + - include ssh control master! + -------------------------------------------------------------------------------- - Initial install support From 143a3a62dda6c7e08c0f3a66dc359507d634744b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 20 Sep 2011 14:40:20 +0200 Subject: [PATCH 3/7] ++todo Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 9e9ca0e7..44829060 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -16,6 +16,7 @@ - write tutorial!!!!!!!!! - like ccollect! - include ssh control master! + - add local/ hint (and add to git) -------------------------------------------------------------------------------- From 12e6e9288e85fc16f84ccbd3eac73e7cd08ca3e3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 20 Sep 2011 14:45:19 +0200 Subject: [PATCH 4/7] ++tutorial Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 44829060..91dbc72f 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -17,6 +17,9 @@ - like ccollect! - include ssh control master! - add local/ hint (and add to git) + - add hint for ssh StrictHostKeyChecking no + - and that ssh will wait for answer of prompt + - nasty if used in parallel mode (scroll up!) -------------------------------------------------------------------------------- From 462ed49a74e2d8c512b85163d2cd2fafda4f4a09 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 22 Sep 2011 18:43:36 +0200 Subject: [PATCH 5/7] BUGFIX: TypeError: Can't convert 'list' object to str implicitly (in emulator) Signed-off-by: Nico Schottelius --- bin/cdist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist b/bin/cdist index 1f44ba2d..9a745251 100755 --- a/bin/cdist +++ b/bin/cdist @@ -688,8 +688,8 @@ def emulator(): param_fd.close() if(param_old != param): - print("Parameter differs: " + param_old + "vs," + param) - print("Source = " + old_object_source + "new =" + object_source) + print("Parameter " + param + " differs: " + " ".join(param_old) + " vs. " + param) + print("Sources: " + " ".join(old_object_source) + " and " + object_source) sys.exit(1) else: param_fd = open(file, "w") From 7a09266abf391a98c3a9f836af4176e6d99c62a9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 23 Sep 2011 13:49:02 +0200 Subject: [PATCH 6/7] allow users to check whether an object changed Signed-off-by: Nico Schottelius --- bin/cdist | 6 +++++- doc/changelog | 4 +++- doc/man/cdist-reference.text.sh | 10 ++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/bin/cdist b/bin/cdist index 9a745251..e085a226 100755 --- a/bin/cdist +++ b/bin/cdist @@ -485,7 +485,7 @@ class Cdist: ] for bin in paths: if os.path.isfile(bin): - # omit "gen" from gencode and + # omit "gen" from gencode and use it for output base outfile=os.path.join(self.object_dir(cdist_object), os.path.basename(bin)[3:]) @@ -507,6 +507,10 @@ class Cdist: # Add header and make executable - identically to 0o700 os.chmod(outfile, stat.S_IXUSR | stat.S_IRUSR | stat.S_IWUSR) + # Mark object as changed + open(os.path.join(self.object_dir(cdist_object), "changed"), "w").close() + + if mode == "code": local_dir = self.object_dir(cdist_object) remote_dir = self.remote_object_dir(cdist_object) diff --git a/doc/changelog b/doc/changelog index cc6aa78b..d69011ee 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,5 +1,7 @@ 2.0.1: - * Bugfix cdist: Always print source of error in case of exec errors + * Bugfix core: Always print source of error in case of exec errors + * Bugfix core: Various smaller bugs in string concatenation + * Feature: Add marker "changed" to changed objects 2.0.0: 2011-09-16 * New Type: __package_rubygem (Chase Allen James) diff --git a/doc/man/cdist-reference.text.sh b/doc/man/cdist-reference.text.sh index e38f157d..c205bdcc 100755 --- a/doc/man/cdist-reference.text.sh +++ b/doc/man/cdist-reference.text.sh @@ -154,6 +154,16 @@ done cat << eof +OBJECTS +------- +For object to object communication and tests, the following paths are +usable within a object directory: + +changed:: + This empty file exists in an object directory, if the object has + code to be excuted (either remote or local) + + ENVIRONMENT VARIABLES --------------------- __explorer:: From ca3644b73a4ceb9ac0c156ca07d1b2b49851675d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 23 Sep 2011 13:50:49 +0200 Subject: [PATCH 7/7] ++version Signed-off-by: Nico Schottelius --- doc/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog b/doc/changelog index d69011ee..b1149eb1 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,4 +1,4 @@ -2.0.1: +2.0.1: 2011-09-23 * Bugfix core: Always print source of error in case of exec errors * Bugfix core: Various smaller bugs in string concatenation * Feature: Add marker "changed" to changed objects