forked from ungleich-public/cdist
__package_apt to accept .dpk file as --source
This commit is contained in:
parent
77d9a757ec
commit
35582f948f
3 changed files with 25 additions and 3 deletions
|
@ -101,10 +101,26 @@ if [ ! -f /var/cache/apt/pkgcache.bin ] || [ "\$( stat --format %Y /var/cache/ap
|
|||
then echo apt-get $apt_opts update > /dev/null 2>&1 || true
|
||||
fi
|
||||
EOF
|
||||
if [ -n "$version" ]; then
|
||||
name="${name}=${version}"
|
||||
if [ -f "$__object/parameter/source" ]; then
|
||||
source_path="$(cat "$__object/parameter/source")"
|
||||
tempfile="$($__remote_exec $__target_host "mktemp -t cidst.XXXXX.${source_path##*/}")"
|
||||
|
||||
# IPv6 fix
|
||||
if echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$'
|
||||
then
|
||||
my_target_host="[${__target_host}]"
|
||||
else
|
||||
my_target_host="${__target_host}"
|
||||
fi
|
||||
$__remote_copy "$source_path" "${my_target_host}:$tempfile"
|
||||
|
||||
echo "$aptget $recommendsparam install $tempfile"
|
||||
else
|
||||
if [ -n "$version" ]; then
|
||||
name="${name}=${version}"
|
||||
fi
|
||||
echo "$aptget $recommendsparam install $target_release '$name'"
|
||||
fi
|
||||
echo "$aptget $recommendsparam install $target_release '$name'"
|
||||
echo "installed" >> "$__messages_out"
|
||||
;;
|
||||
absent)
|
||||
|
|
|
@ -38,6 +38,11 @@ version
|
|||
The version of the package to install. Default is to install the version
|
||||
chosen by the local package manager.
|
||||
|
||||
source
|
||||
Source dpkg package to upload an install (instead of fetching
|
||||
from the repositories). Dependencies will be collected and installed
|
||||
from the usual sources though.
|
||||
|
||||
|
||||
BOOLEAN PARAMETERS
|
||||
------------------
|
||||
|
|
|
@ -2,3 +2,4 @@ name
|
|||
version
|
||||
state
|
||||
target-release
|
||||
source
|
||||
|
|
Loading…
Reference in a new issue