Commit 08d5814e authored by Ander Punnar's avatar Ander Punnar

__package_apt: update index cache, on installation, when it is older than one day

parent 7a5d6d5a
......@@ -74,6 +74,11 @@ fi
case "$state_should" in
present)
cat << EOF
if [ -f /var/cache/apt/pkgcache.bin ] && [ "\$( stat --format %Y /var/cache/apt/pkgcache.bin )" -lt "\$( date +%s -d '-1 day' )" ]
then echo apt-get update > /dev/null 2>&1 || true
fi
EOF
if [ -n "$version" ]; then
name="${name}=${version}"
fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment