WIP boostrap_sdk: introduce a 'stage0' step and use as seed for gentoo stage build process

This commit is contained in:
Jeremi Piotrowski 2021-10-26 20:10:36 +02:00
parent 50ed7f3007
commit 0550b96848
2 changed files with 15 additions and 5 deletions

View File

@ -190,9 +190,13 @@ build_stage1() {
# If we are to use a git ref for either ebuild repo we want to update the stage1 seed SDK
if [ -n "${FLAGS_stage1_portage_ref}" -o -n "${FLAGS_stage1_overlay_ref}" ] ; then
sed -i 's/^update_seed: no/update_seed: yes/' "$TEMPDIR/stage1.spec"
sed -i '/update_seed_command/d' "$TEMPDIR/stage1.spec"
sed -i 's/^update_seed:.*/update_seed: yes/' "$TEMPDIR/stage1.spec"
echo "update_seed_command: --update --deep --newuse --complete-graph --rebuild-if-new-ver --rebuild-exclude cross-*-cros-linux-gnu/* sys-devel/gcc " \
>>"$TEMPDIR/stage1.spec"
else
sed -i '/update_seed_command/d' "$TEMPDIR/stage1.spec"
sed -i 's/^update_seed:.*/update_seed: no/' "$TEMPDIR/stage1.spec"
fi
# Finally, build stage 1
@ -200,9 +204,14 @@ build_stage1() {
}
if [[ "$STAGES" =~ stage1 ]]; then
build_stage1
STAGES="${STAGES/stage1/}"
SEED="${TYPE}/stage1-${ARCH}-latest"
STAGE0_TYPE="flatcar-sdk-stage0"
(
STAGES="stage1"
TYPE="${STAGE0_TYPE}"
catalyst_init stage1
build_stage1
)
SEED="${STAGE0_TYPE}/stage1-${ARCH}-latest"
fi
catalyst_build

View File

@ -120,7 +120,8 @@ cat <<EOF
target: stage1
# stage1 packages aren't published, save in tmp
pkgcache_path: ${TEMPDIR}/stage1-${ARCH}-packages
update_seed: no
update_seed: yes
update_seed_command: --update --deep --newuse @world
EOF
catalyst_stage_default
}