From 0b94a11d27a9256b146e89ccc5cfaee4bf684cd0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 18:40:58 +0100 Subject: [PATCH] implement the rename to cdist-type-build-emulation in cdist-manifest-run and cleanups Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 ++ bin/cdist-deploy-to | 4 +++- bin/cdist-manifest-run | 4 ++-- bin/cdist-type-build-emulation | 11 +++++------ 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 77f60605..1976db86 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -37,6 +37,7 @@ set -au : ${__cdist_name_init:=init} : ${__cdist_name_out_dir:=out} : ${__cdist_name_conf_dir:=conf} +: ${__cdist_name_type_bin:=type_bin} # Name of the manifest file in types : ${__cdist_name_manifest:=manifest} @@ -92,6 +93,7 @@ __cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX") : ${__cdist_out_dir:=$__cdist_tmp_dir/$__cdist_name_out_dir} : ${__cdist_out_explorer_dir:=$__cdist_out_dir/$__cdist_name_explorer} : ${__cdist_out_object_dir:=$__cdist_out_dir/$__cdist_name_object} +: ${__cdist_out_type_bin_dir:=$__cdist_out_dir/$__cdist_name_type_bin} ################################################################################ diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 50bb48b8..54cd4623 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -37,9 +37,11 @@ cdist-bin-transfer "$__cdist_target_host" "${__cdist_remote_bin_dir}" # Execute explorer cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorer_dir" +# Create initial object base +cdist-manifest-init "$__cdist_target_host" "$__cdist_out_object_dir" + exit 2 -cdist-manifest-init "$__cdist_target_host" "$__cdist_out_object_dir" cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_object_dir" cdist-object-explorer-all "$__cdist_target_host" "$__cdist_out_object_dir" exit 0 diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index 5d617444..48990edb 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -31,10 +31,10 @@ export __cdist_manifest="$1"; shift export __cdist_output_dir="$1"; shift # Ensure binaries exist and are up-to-date -cdist-build-bin || __cdist_exit_err "Failed to build support binaries" +cdist-type-build-emulation || __cdist_exit_err "Failed to build type emulation binaries" # prepend our path, so all cdist tools come before other tools -PATH="${__cdist_cache_bin}:$PATH" +PATH="${__cdist_out_type_bin_dir}:$PATH" # Force -x, so the user is aware the file is executed if [ ! -x "${__cdist_manifest}" ]; then diff --git a/bin/cdist-type-build-emulation b/bin/cdist-type-build-emulation index 18b0dfbb..e5def2bd 100755 --- a/bin/cdist-type-build-emulation +++ b/bin/cdist-type-build-emulation @@ -1,6 +1,6 @@ #!/bin/sh # -# 2010 Nico Schottelius (nico-cdist at schottelius.org) +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -17,15 +17,14 @@ # You should have received a copy of the GNU General Public License # along with cdist. If not, see . # -# Build pseudo binaries +# Build pseudo binaries for type emulation # . cdist-config - set -aeu # FIXME: load this from the cdist-core library -__cdist_tree_wrapper="$(which cdist_tree_wrapper)" +__cdist_type_emulator="$(which cdist-type-emulator)" if [ ! -d ${__cdist_type_dir} ]; then __cdist_exit_err "$__cdist_type_dir must exist and contain available types" @@ -36,7 +35,7 @@ cd "${__cdist_type_dir}" ls -1 > "${__cdist_tmp_file}" # Create binaries -mkdir -p "${__cdist_cache_bin}" +mkdir -p "${__cdist_out_type_bin_dir}" while read type; do - ln -sf "${__cdist_tree_wrapper}" "${__cdist_cache_bin}/${type}" + ln -sf "${__cdist_type_emulator}" "${__cdist_out_type_bin_dir}/${type}" done < "${__cdist_tmp_file}"