Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
From 2419c53879d7d2cfc4be387f8d48e5661489c329 Mon Sep 17 00:00:00 2001
From: Sammy Pfeiffer <Sammy.Pfeiffer@student.uts.edu.au>
Date: Mon, 13 Jan 2020 17:58:15 +1100
Subject: [PATCH 1/1] Add the possibility to stop after a specific stage
---
scripts/bootstrap-prefix.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index b0d2a09..63dbff0 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -2738,6 +2738,8 @@ EOF
exit 1
fi
+ [[ ${STOP_AFTER_STAGE} == 'stage1' ]] && exit 0
+
unset ROOT
# stage1 has set a profile, which defines CHOST, so unset any CHOST
@@ -2787,6 +2789,8 @@ EOF
exit 1
fi
+ [[ ${STOP_AFTER_STAGE} == 'stage2' ]] && exit 0
+
# new bash
hash -r
@@ -2825,6 +2829,8 @@ EOF
exit 1
fi
+ [[ ${STOP_AFTER_STAGE} == 'stage3' ]] && exit 0
+
local cmd="emerge -e system"
if [[ -e ${EPREFIX}/var/cache/edb/mtimedb ]] && \
grep -q resume "${EPREFIX}"/var/cache/edb/mtimedb ;
@@ -3057,6 +3063,9 @@ einfo "host: ${CHOST}"
einfo "prefix: ${ROOT}"
TODO=${2}
+# In order to bootstrap in phases for CI, allow to stop after a specific stage
+# in noninteractive mode
+STOP_AFTER_STAGE=${3}
if [[ ${TODO} != "noninteractive" && $(type -t bootstrap_${TODO}) != "function" ]];
then
eerror "bootstrap target ${TODO} unknown"
--
2.7.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.