summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorRyan Finnie <ryan@finnie.org>2021-02-04 12:37:46 -0800
committerRyan Finnie <ryan@finnie.org>2021-02-04 12:37:46 -0800
commitd6b7a54831fe0b7d87792688555c4417a3ec0902 (patch)
tree0c744f9ef5e27d8015aff3480272c14991596fcf /functions
parent5c838744d6e43752dc6d99c6569f89463316d5e8 (diff)
downloadvyos-live-build-d6b7a54831fe0b7d87792688555c4417a3ec0902.tar.gz
vyos-live-build-d6b7a54831fe0b7d87792688555c4417a3ec0902.zip
Restore_package_cache: Handle existing but empty packages directory
Diffstat (limited to 'functions')
-rwxr-xr-xfunctions/cache.sh4
1 files 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