From 1b80f2806b55d52d6d7fe4c31d9b88aab88c10f6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 21 Sep 2012 11:32:04 +0200 Subject: [PATCH] remove installed/removed state parameters (2.1 cleanup) Signed-off-by: Nico Schottelius --- conf/type/__package/man.text | 1 - conf/type/__package_apt/gencode-remote | 12 ------------ conf/type/__package_apt/man.text | 3 +-- conf/type/__package_luarocks/gencode-remote | 12 ------------ conf/type/__package_luarocks/man.text | 1 - conf/type/__package_opkg/gencode-remote | 1 - conf/type/__package_pacman/gencode-remote | 10 ---------- conf/type/__package_pacman/man.text | 1 - conf/type/__package_pkg_freebsd/gencode-remote | 1 - conf/type/__package_pkg_freebsd/man.text | 8 ++++---- conf/type/__package_pkg_openbsd/gencode-remote | 11 ----------- conf/type/__package_pkg_openbsd/man.text | 1 - conf/type/__package_rubygem/gencode-remote | 11 ----------- conf/type/__package_rubygem/man.text | 1 - conf/type/__package_yum/gencode-remote | 10 ---------- conf/type/__package_yum/man.text | 3 +-- conf/type/__process/gencode-remote | 10 ---------- 17 files changed, 6 insertions(+), 91 deletions(-) diff --git a/conf/type/__package/man.text b/conf/type/__package/man.text index 071a8bfb..0d8f8c9e 100644 --- a/conf/type/__package/man.text +++ b/conf/type/__package/man.text @@ -18,7 +18,6 @@ REQUIRED PARAMETERS ------------------- state:: The state the package should be in, either "present" or "absent" - (the old values "installed" or "removed" will be removed in cdist 2.1). OPTIONAL PARAMETERS diff --git a/conf/type/__package_apt/gencode-remote b/conf/type/__package_apt/gencode-remote index 0bcdb946..a5bd7708 100755 --- a/conf/type/__package_apt/gencode-remote +++ b/conf/type/__package_apt/gencode-remote @@ -29,18 +29,6 @@ fi state_should="$(cat "$__object/parameter/state")" -# Correct pre 2.1 naming - FIXME in 2.1 -case "$state_should" in - installed) - echo "WARNING: ${__object_name}: $state_should is deprecated and will be removed in cdist 2.1. Please change to present/absent." >&2 - state_should="present" - ;; - removed) - echo "WARNING: ${__object_name}: $state_should is deprecated and will be removed in cdist 2.1. Please change to present/absent." >&2 - state_should="absent" - ;; -esac - # FIXME: use grep directly, state is a list, not a line! state_is="$(cat "$__object/explorer/state")" case "$state_is" in diff --git a/conf/type/__package_apt/man.text b/conf/type/__package_apt/man.text index fd9c1a9c..5848a131 100644 --- a/conf/type/__package_apt/man.text +++ b/conf/type/__package_apt/man.text @@ -18,7 +18,6 @@ REQUIRED PARAMETERS ------------------- state:: The state the package should be in, either "present" or "absent" - (the old values "installed" or "removed" will be removed in cdist 2.1). OPTIONAL PARAMETERS @@ -50,5 +49,5 @@ SEE ALSO COPYING ------- -Copyright \(C) 2011 Nico Schottelius. Free use of this software is +Copyright \(C) 2011-2012 Nico Schottelius. Free use of this software is granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/conf/type/__package_luarocks/gencode-remote b/conf/type/__package_luarocks/gencode-remote index 327f812c..1046a936 100755 --- a/conf/type/__package_luarocks/gencode-remote +++ b/conf/type/__package_luarocks/gencode-remote @@ -30,18 +30,6 @@ else fi state_should="$(cat "$__object/parameter/state")" -# Correct pre 2.1 naming - FIXME in 2.1 -case "$state_should" in - installed) - echo "WARNING: ${__object_name}: $state_should is deprecated and will be removed in cdist 2.1. Please change to present/absent." >&2 - state_should="present" - ;; - removed) - echo "WARNING: ${__object_name}: $state_should is deprecated and will be removed in cdist 2.1. Please change to present/absent." >&2 - state_should="absent" - ;; -esac - if grep -q "(installed)" "$__object/explorer/pkg_status"; then state_is="present" diff --git a/conf/type/__package_luarocks/man.text b/conf/type/__package_luarocks/man.text index 8b041b7c..75ac93fb 100644 --- a/conf/type/__package_luarocks/man.text +++ b/conf/type/__package_luarocks/man.text @@ -17,7 +17,6 @@ REQUIRED PARAMETERS ------------------- state:: The state the package should be in, either "present" or "absent" - (the old values "installed" or "removed" will be removed in cdist 2.1). OPTIONAL PARAMETERS diff --git a/conf/type/__package_opkg/gencode-remote b/conf/type/__package_opkg/gencode-remote index bd9a599b..ab8b5ee8 100755 --- a/conf/type/__package_opkg/gencode-remote +++ b/conf/type/__package_opkg/gencode-remote @@ -54,4 +54,3 @@ if [ "$state_is" != "$state_should" ]; then ;; esac fi - diff --git a/conf/type/__package_pacman/gencode-remote b/conf/type/__package_pacman/gencode-remote index e585ee86..da1ac7c2 100755 --- a/conf/type/__package_pacman/gencode-remote +++ b/conf/type/__package_pacman/gencode-remote @@ -32,16 +32,6 @@ else fi state_should="$(cat "$__object/parameter/state")" -case "$state_should" in - installed) - echo "WARNING: ${__object_name}: $state_should is deprecated and will be removed in cdist 2.1. Please change to present/absent." >&2 - state_should="present" - ;; - removed) - echo "WARNING: ${__object_name}: $state_should is deprecated and will be removed in cdist 2.1. Please change to present/absent." >&2 - state_should="absent" - ;; -esac pkg_version="$(cat "$__object/explorer/pkg_version")" if [ -z "$pkg_version" ]; then diff --git a/conf/type/__package_pacman/man.text b/conf/type/__package_pacman/man.text index fe2abac8..4c23a2bd 100644 --- a/conf/type/__package_pacman/man.text +++ b/conf/type/__package_pacman/man.text @@ -18,7 +18,6 @@ REQUIRED PARAMETERS ------------------- state:: The state the package should be in, either "present" or "absent" - (the old values "installed" or "removed" will be removed in cdist 2.1). OPTIONAL PARAMETERS diff --git a/conf/type/__package_pkg_freebsd/gencode-remote b/conf/type/__package_pkg_freebsd/gencode-remote index ef6632c0..21120d41 100755 --- a/conf/type/__package_pkg_freebsd/gencode-remote +++ b/conf/type/__package_pkg_freebsd/gencode-remote @@ -133,4 +133,3 @@ fi # Debug #set +x - diff --git a/conf/type/__package_pkg_freebsd/man.text b/conf/type/__package_pkg_freebsd/man.text index f41ac47a..fd9a6792 100644 --- a/conf/type/__package_pkg_freebsd/man.text +++ b/conf/type/__package_pkg_freebsd/man.text @@ -39,16 +39,16 @@ EXAMPLES -------------------------------------------------------------------------------- # Ensure zsh is installed -__package_pkg_freebsd zsh --state installed +__package_pkg_freebsd zsh --state present # Ensure vim is installed, use flavor no_x11 -__package_pkg_freebsd vim --state installed --flavor no_x11 +__package_pkg_freebsd vim --state present --flavor no_x11 # If you don't want to follow pythonX packages, but always use python -__package_pkg_freebsd python --state installed --name python2 +__package_pkg_freebsd python --state present --name python2 # Remove obsolete package -__package_pkg_freebsd puppet --state removed +__package_pkg_freebsd puppet --state absent -------------------------------------------------------------------------------- diff --git a/conf/type/__package_pkg_openbsd/gencode-remote b/conf/type/__package_pkg_openbsd/gencode-remote index 26dd4689..ed36f04a 100755 --- a/conf/type/__package_pkg_openbsd/gencode-remote +++ b/conf/type/__package_pkg_openbsd/gencode-remote @@ -43,17 +43,6 @@ else fi state_should="$(cat "$__object/parameter/state")" -# Correct pre 2.1 naming - FIXME in 2.1 -case "$state_should" in - installed) - echo "WARNING: ${__object_name}: $state_should is deprecated and will be removed in cdist 2.1. Please change to present/absent." >&2 - state_should="present" - ;; - removed) - echo "WARNING: ${__object_name}: $state_should is deprecated and will be removed in cdist 2.1. Please change to present/absent." >&2 - state_should="absent" - ;; -esac pkg_version="$(cat "$__object/explorer/pkg_version")" diff --git a/conf/type/__package_pkg_openbsd/man.text b/conf/type/__package_pkg_openbsd/man.text index 71cf9d4e..19bb2094 100644 --- a/conf/type/__package_pkg_openbsd/man.text +++ b/conf/type/__package_pkg_openbsd/man.text @@ -17,7 +17,6 @@ REQUIRED PARAMETERS ------------------- state:: The state the package should be in, either "present" or "absent" - (the old values "installed" or "removed" will be removed in cdist 2.1). OPTIONAL PARAMETERS diff --git a/conf/type/__package_rubygem/gencode-remote b/conf/type/__package_rubygem/gencode-remote index 638c4252..dc755ad3 100755 --- a/conf/type/__package_rubygem/gencode-remote +++ b/conf/type/__package_rubygem/gencode-remote @@ -28,17 +28,6 @@ else fi state_should="$(cat "$__object/parameter/state")" -# Correct pre 2.1 naming - FIXME in 2.1 -case "$state_should" in - installed) - echo "WARNING: ${__object_name}: $state_should is deprecated and will be removed in cdist 2.1. Please change to present/absent." >&2 - state_should="present" - ;; - removed) - echo "WARNING: ${__object_name}: $state_should is deprecated and will be removed in cdist 2.1. Please change to present/absent." >&2 - state_should="absent" - ;; -esac if grep -q true "$__object/explorer/pkg_status"; then state_is="present" diff --git a/conf/type/__package_rubygem/man.text b/conf/type/__package_rubygem/man.text index 79bb8b52..afe2b358 100644 --- a/conf/type/__package_rubygem/man.text +++ b/conf/type/__package_rubygem/man.text @@ -17,7 +17,6 @@ REQUIRED PARAMETERS ------------------- state:: The state the package should be in, either "present" or "absent" - (the old values "installed" or "removed" will be removed in cdist 2.1). OPTIONAL PARAMETERS diff --git a/conf/type/__package_yum/gencode-remote b/conf/type/__package_yum/gencode-remote index df2bf405..5f0e8ac8 100755 --- a/conf/type/__package_yum/gencode-remote +++ b/conf/type/__package_yum/gencode-remote @@ -28,16 +28,6 @@ else fi state_should="$(cat "$__object/parameter/state")" -case "$state_should" in - installed) - echo "WARNING: ${__object_name}: $state_should is deprecated and will be removed in cdist 2.1. Please change to present/absent." >&2 - state_should="present" - ;; - removed) - echo "WARNING: ${__object_name}: $state_should is deprecated and will be removed in cdist 2.1. Please change to present/absent." >&2 - state_should="absent" - ;; -esac if grep -q -E "(centos|redhat|amazon)" "$__global/explorer/os"; then opts="-y --quiet" diff --git a/conf/type/__package_yum/man.text b/conf/type/__package_yum/man.text index 9dfb394e..4aa3ddc0 100644 --- a/conf/type/__package_yum/man.text +++ b/conf/type/__package_yum/man.text @@ -19,7 +19,6 @@ REQUIRED PARAMETERS ------------------- state:: The state the package should be in, either "present" or "absent" - (the old values "installed" or "removed" will be removed in cdist 2.1). OPTIONAL PARAMETERS @@ -51,5 +50,5 @@ SEE ALSO COPYING ------- -Copyright \(C) 2011 Nico Schottelius. Free use of this software is +Copyright \(C) 2011-2012 Nico Schottelius. Free use of this software is granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/conf/type/__process/gencode-remote b/conf/type/__process/gencode-remote index 3411734e..e4519f3c 100755 --- a/conf/type/__process/gencode-remote +++ b/conf/type/__process/gencode-remote @@ -26,16 +26,6 @@ else fi state_should="$(cat "$__object/parameter/state")" -case "$state_should" in - running) - echo "WARNING: ${__object_name}: $state_should is deprecated and will be removed in cdist 2.1. Please change to present/absent." >&2 - state_should="present" - ;; - stopped) - echo "WARNING: ${__object_name}: $state_should is deprecated and will be removed in cdist 2.1. Please change to present/absent." >&2 - state_should="absent" - ;; -esac runs="$(cat "$__object/explorer/runs")" if [ "$runs" ]; then