summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build')
-rwxr-xr-xscripts/build/bootstrap_cache14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/build/bootstrap_cache b/scripts/build/bootstrap_cache
index 1bbc439b5..d8e9607aa 100755
--- a/scripts/build/bootstrap_cache
+++ b/scripts/build/bootstrap_cache
@@ -55,6 +55,20 @@ case "${_ACTION}" in
# Removing old chroot
rm -rf chroot
+ # Catch failure condition.
+ # The installer stage, if not 'none' or 'live' needs to copy cached
+ # bootstrap packages, and will error if these do not exist. This
+ # could be the case if bootstrap is cached but the packages were
+ # wiped from the cache. This detects this condition and if it is the
+ # case, ignores the cached bootstrap, forcing it to be rebuilt thus
+ # re-caching the packages.
+ if ! In_list "${LB_DEBIAN_INSTALLER}" live none &&
+ ! ls cache/packages.bootstrap/*.deb > /dev/null 2>&1
+ then
+ Echo_message "Cached bootstrap packages required but missing, ignoring cached bootstrap to force rebuild."
+ exit 0
+ fi
+
# Restoring old cache
cp -a cache/bootstrap chroot