summaryrefslogtreecommitdiff
path: root/functions/cache.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2011-07-19 11:13:17 +0200
committerDaniel Baumann <daniel@debian.org>2011-07-19 11:13:17 +0200
commiteb2a305a5f692a1661001bae1c8e6d202f4280e9 (patch)
tree866057eafab09594f33b849b4c754f55bbe2854b /functions/cache.sh
parent691b06f7a6f08e82967b188cc31d1dcb6737bce5 (diff)
downloadvyos-live-build-eb2a305a5f692a1661001bae1c8e6d202f4280e9.tar.gz
vyos-live-build-eb2a305a5f692a1661001bae1c8e6d202f4280e9.zip
Saving packages in cache even when failing or interrupting a build (Closes: #586929).
Diffstat (limited to 'functions/cache.sh')
-rwxr-xr-xfunctions/cache.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/functions/cache.sh b/functions/cache.sh
index c2978318e..2b75266d6 100755
--- a/functions/cache.sh
+++ b/functions/cache.sh
@@ -36,7 +36,9 @@ Save_cache ()
if [ "${LB_CACHE}" = "true" ] && [ "${LB_CACHE_PACKAGES}" = "true" ]
then
# Cleaning current cache
- Chroot chroot "apt-get autoclean"
+ # In case of interrupted or incomplete builds, this may return an error,
+ # but we still do want to save the cache.
+ Chroot chroot "apt-get autoclean" || true
if ls chroot/var/cache/apt/archives/*.deb > /dev/null 2>&1
then