[SCM] live-build branch, debian, updated. debian/3.0_a25-1-57-g6167d10
Daniel Baumann
daniel at debian.org
Thu Aug 4 19:53:16 UTC 2011
The following commit has been merged in the debian branch:
commit eb2a305a5f692a1661001bae1c8e6d202f4280e9
Author: Daniel Baumann <daniel at debian.org>
Date: Tue Jul 19 11:13:17 2011 +0200
Saving packages in cache even when failing or interrupting a build (Closes: #586929).
diff --git a/functions/cache.sh b/functions/cache.sh
index c297831..2b75266 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
diff --git a/functions/exit.sh b/functions/exit.sh
index b6f2e2b..ad17c1e 100755
--- a/functions/exit.sh
+++ b/functions/exit.sh
@@ -35,6 +35,19 @@ Exit ()
done
fi
+ Echo_message "Saving chaches..."
+
+ # We can't really know at which part we're failing,
+ # but let's assume that if there's any binary stage file arround
+ # we are in binary stage.
+
+ if ls .stage/binary* > /dev/null 2>&1
+ then
+ Save_cache cache/packages_binary
+ else
+ Save_cache cache/packages_chroot
+ fi
+
return ${VALUE}
}
--
live-build
More information about the debian-live-changes
mailing list