From d6b7a54831fe0b7d87792688555c4417a3ec0902 Mon Sep 17 00:00:00 2001 From: Ryan Finnie Date: Thu, 4 Feb 2021 12:37:46 -0800 Subject: [PATCH] Restore_package_cache: Handle existing but empty packages directory --- functions/cache.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/cache.sh b/functions/cache.sh index 3e5c7ef70..9b515db17 100755 --- a/functions/cache.sh +++ b/functions/cache.sh @@ -21,10 +21,10 @@ Restore_package_cache () if [ "$(stat --printf %d ${DIRECTORY}/)" = "$(stat --printf %d chroot/var/cache/apt/archives/)" ] then # with hardlinks - find "${DIRECTORY}" -name "*.deb" | xargs cp -fl -t chroot/var/cache/apt/archives + find "${DIRECTORY}" -name "*.deb" -print0 | xargs -0 --no-run-if-empty cp -fl -t chroot/var/cache/apt/archives else # without hardlinks - find "${DIRECTORY}" -name "*.deb" | xargs cp -t chroot/var/cache/apt/archives + find "${DIRECTORY}" -name "*.deb" -print0 | xargs -0 --no-run-if-empty cp -t chroot/var/cache/apt/archives fi fi fi