summaryrefslogtreecommitdiff
path: root/scripts/common
diff options
context:
space:
mode:
authorSerge Schneider <serge@raspberrypi.com>2021-06-22 15:57:11 +0100
committerSerge Schneider <serge@raspberrypi.com>2021-06-22 15:57:11 +0100
commit4b59b5a70d349fd9459a42cdecc162007d3a2fcf (patch)
tree04da89311b9d61198621c6b8cc0b0822b90b124b /scripts/common
parent95ea0ba6963441cc1a65b2059a257b32773ae5b2 (diff)
parentf9d44edb72e9a153c997266189c79cb1f96b69f3 (diff)
Merge remote-tracking branch 'upstream/master' into arm64
Diffstat (limited to 'scripts/common')
-rw-r--r--scripts/common6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/common b/scripts/common
index 6586052..2733fd8 100644
--- a/scripts/common
+++ b/scripts/common
@@ -22,8 +22,10 @@ bootstrap(){
capsh --drop=cap_setfcap -- -c "'${BOOTSTRAP_CMD}' $BOOTSTRAP_STR" || true
- if [ -d "$2/debootstrap" ]; then
- rmdir "$2/debootstrap"
+ if [ -d "$2/debootstrap" ] && ! rmdir "$2/debootstrap"; then
+ cp "$2/debootstrap/debootstrap.log" "${STAGE_WORK_DIR}"
+ log "bootstrap failed: please check ${STAGE_WORK_DIR}/debootstrap.log"
+ return 1
fi
}
export -f bootstrap