__package_apt: pkgcache.bin may not exist

This commit is contained in:
ander 2020-02-09 20:43:09 +02:00
parent 08d5814e2c
commit b3bad9468d

View file

@ -75,7 +75,7 @@ fi
case "$state_should" in case "$state_should" in
present) present)
cat << EOF cat << EOF
if [ -f /var/cache/apt/pkgcache.bin ] && [ "\$( stat --format %Y /var/cache/apt/pkgcache.bin )" -lt "\$( date +%s -d '-1 day' )" ] 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 then echo apt-get update > /dev/null 2>&1 || true
fi fi
EOF EOF