add support for --target-release for __package_apt

Signed-off-by: Nico Schottelius <nico@freiheit.schottelius.org>
This commit is contained in:
Nico Schottelius 2014-11-25 23:00:17 +01:00
parent 00d5524af9
commit dd562befc9
4 changed files with 14 additions and 2 deletions

View file

@ -67,7 +67,7 @@ DONE
if [ "$upload_file" ]; then
echo upload >> "$__messages_out"
cat << DONE
$__remote_copy $source ${__target_host}:\$destination_upload
$__remote_copy "$source" "${__target_host}:\$destination_upload"
DONE
fi
# move uploaded file into place

View file

@ -33,6 +33,14 @@ else
state_should="present"
fi
if [ -f "$__object/parameter/target-release" ]; then
target_release="--target-release $(cat "$__object/parameter/target-release")"
else
target_release=""
fi
# FIXME: use grep directly, state is a list, not a line!
state_is="$(cat "$__object/explorer/state")"
case "$state_is" in
@ -50,7 +58,7 @@ aptget="DEBIAN_FRONTEND=noninteractive apt-get --quiet --yes --no-install-recomm
case "$state_should" in
present)
echo $aptget install \"$name\"
echo $aptget install $target_release \"$name\"
;;
absent)
echo $aptget remove \"$name\"

View file

@ -27,6 +27,9 @@ name::
state::
Either "present" or "absent", defaults to "present"
target-release::
Passed on to apt-get install, see apt-get(8).
Essentially allows you to retrieve packages from a different release
EXAMPLES
--------

View file

@ -1,3 +1,4 @@
name
version
state
target-release