diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2012-03-21 14:07:34 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2012-03-21 14:10:41 +0000 |
commit | c567d63b28ac9d37b0c2a0db8dcb6b70e0665f55 (patch) | |
tree | 84907e3f01879bed52f85170275e2894f64550f3 /run-bootstrap-in-chroot | |
parent | 66e4aed2cf379d629e0351f0dacab9dd185c39fe (diff) | |
download | morph-c567d63b28ac9d37b0c2a0db8dcb6b70e0665f55.tar.gz |
bootstrap: don't always build or extract squeeze
If there are later snapshots available, we should not extract
the squeeze chroot. This follows similar logic to the rest of
the build stages.
Diffstat (limited to 'run-bootstrap-in-chroot')
-rwxr-xr-x | run-bootstrap-in-chroot | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/run-bootstrap-in-chroot b/run-bootstrap-in-chroot index d0fa89f2..c934bc1b 100755 --- a/run-bootstrap-in-chroot +++ b/run-bootstrap-in-chroot @@ -115,35 +115,36 @@ rm -rf "$dir" mkdir "$dir" chrootsnapshot="$snapshotdir/squeeze.tar.gz" -if "$snapshot" && [ -e "$chrootsnapshot" ] -then - tar -C "$dir" -xhf "$chrootsnapshot" -else - debootstrap \ - --include=build-essential,\ -gawk,bison,flex,python,autoconf,autopoint,automake,gettext,libtool,\ -help2man,texinfo,sudo,ccache,gperf \ -squeeze "$dir" "$DEBIAN_MIRROR" - - # create the directory for cached ccache object files - mkdir -p "$dir/var/tmp/ccache" - - # We need a backport of tar 1.26. On ARM, older versions (possibly - # prior to 1.25) have a bug unpacking things onto an NFS filesystem. - # We have a custom apt repository, so we'll add that to apt's sources.list - # and install tar manually. - # cliapp comes from code.liw.fi, so that needs to be added as well - cat <<EOF >> "$dir/etc/apt/sources.list" +if ! "$snapshot" || ! has_pass pass1a; then + if "$snapshot" && [ -e "$chrootsnapshot" ] + then + tar -C "$dir" -xhf "$chrootsnapshot" + else + debootstrap --include=build-essential,gawk,bison,flex,python,autoconf \ + --include=autopoint,automake,gettext,libtool,help2man \ + --include=texinfo,sudo,ccache,gperf \ + squeeze "$dir" "$DEBIAN_MIRROR" + + # create the directory for cached ccache object files + mkdir -p "$dir/var/tmp/ccache" + + # We need a backport of tar 1.26. On ARM, older versions (possibly + # prior to 1.25) have a bug unpacking things onto an NFS filesystem. + # We have a custom apt repository, so we'll add that to apt's + # sources.list and install tar manually. + # cliapp comes from code.liw.fi, so that needs to be added as well + cat <<EOF >> "$dir/etc/apt/sources.list" deb http://code.liw.fi/debian squeeze main deb http://roadtrain.codethink.co.uk/debrock/ squeeze main EOF - ./do-squeeze-chroot apt-get update - ./do-squeeze-chroot apt-get install --allow-unauthenticated \ - tar python-cliapp + "./do-squeeze-chroot" apt-get update + "./do-squeeze-chroot" apt-get install --allow-unauthenticated \ + tar python-cliapp - if "$snapshot" - then - tar -caf "$chrootsnapshot" -C "$dir" . + if "$snapshot" + then + tar -caf "$chrootsnapshot" -C "$dir" . + fi fi fi |