diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2012-06-19 14:59:24 +0100 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2012-06-20 15:21:40 +0100 |
commit | 6436f17fdabe2d9e504929c220c93fd8ae204f7d (patch) | |
tree | db93ee31076df1008961f6d27fd2d09362e3cc75 /baserock-bootstrap | |
parent | d4dbc27700b82d87894446027dd2d4f272ef3a05 (diff) | |
download | morph-6436f17fdabe2d9e504929c220c93fd8ae204f7d.tar.gz |
bootstrap: turn stratum into tarball for filler
The change of strata into chunk lists broke being able to use the
strata as staging filler. The assemble-stratum script should be
able to provide this stratum
This requires not removing the built chunks from the artifact cache
any more, and preferably not moving them around.
Removing them should no longer be required, since cache keys have
become more advanced since it used to reuse chunks build in
prior stages. If it reuses them now, they should actually be
usable.
Diffstat (limited to 'baserock-bootstrap')
-rwxr-xr-x | baserock-bootstrap | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/baserock-bootstrap b/baserock-bootstrap index b18e2875..34f23129 100755 --- a/baserock-bootstrap +++ b/baserock-bootstrap @@ -306,7 +306,6 @@ pass2b_cleanup_at_end() { echo "Remove unnecessary stuff at the end of pass2b" rm -rf "$LFS/tools" - rm -f "$LFS"/baserock/cache/artifacts/*.chunk.* } @@ -320,15 +319,7 @@ pass3_get_sources_with_morph_in_chroot() { echo "Getting sources with morph" - # use pass 2 sources as a starting point - # but the cached chunks may be invalid, so - # move them away cd "$LFS/baserock/gits/morph" - if [ ! -e "$LFS/baserock/pass2-artifacts" ]; then - mv "$LFS/baserock/cache/artifacts" "$LFS/baserock/pass2-artifacts" - mkdir -p "$LFS/baserock/cache/artifacts" - fi - cat <<EOF > "$LFS/baserock/build.sh" #!/bin/bash set -e @@ -382,10 +373,16 @@ set -x export PATH="/usr/bin:/bin:/usr/sbin:/sbin" cd /baserock/gits/morph + +filler=\$(mktemp) +scripts/assemble-stratum --cachedir /baserock/cache \ + "$LFS/baserock/cache/artifacts/"*.stratum.bootstrap-pass2 \ + "\$filler" bootstrap-pass2 + python ./morph --verbose build \ baserock:morphs master $PASS3_STRATUM \ --staging-chroot \ - --staging-filler "$LFS/baserock/pass2-artifacts/"*.stratum.bootstrap-pass2 \ + --staging-filler "\$filler" \ --no-git-update \ --cachedir=/baserock/cache \ --log=/baserock/morph.log \ @@ -393,6 +390,7 @@ python ./morph --verbose build \ --keep-path \ --bundle-server="$GIT_BUNDLES" \ --target-cflags="$TARGET_CFLAGS" +rm "\$filler" EOF $HOST_CHMOD +x "$LFS/baserock/build_pass3.sh" local do_chroot="$BASEDIR/do-chroot.bash" |