warn about deprecated usage

Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
remotes/origin/feature_files_export
Nico Schottelius 13 years ago
parent 8e5a0f83c5
commit 52849b91c5
  1. 14
      conf/type/__package_apt/gencode-remote

@ -31,11 +31,19 @@ state_should="$(cat "$__object/parameter/state")"
# Correct pre 2.1 naming - FIXME in 2.1
case "$state_should" in
installed) state_should="present" ;;
removed) state_should="absent" ;;
# FIXME: print warning to stderr!
installed)
echo "WARNING: $state_should is deprecated, please change to present/absent (will be removed in cdist 2.1)" >&2
state_should="present"
;;
removed)
echo "WARNING: $state_should is deprecated, please change to present/absent (will be removed in cdist 2.1)" >&2
state_should="absent"
;;
esac
state_is="$(cat "$__object/explorer/pkg_status")"
# FIXME: use grep directly, state is a list, not a line!
state_is="$(cat "$__object/explorer/state")"
case "$state_is" in
present*)
name="$(echo "$state_is" | cut -d ' ' -f 2)"

Loading…
Cancel
Save