summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Jolly <kangie@gentoo.org>2024-05-28 13:36:52 +1000
committerSam James <sam@gentoo.org>2024-05-28 13:43:07 +0100
commitb736fab642e5f3ce519c3b4618595126160e436b (patch)
tree094905bc0d2a73b09dafd4f9d067cd1aaf2ac6d4 /scripts
parentsys-devel/gcc-13.3.0: fix ld64/xtools detection fix (diff)
downloadprefix-b736fab642e5f3ce519c3b4618595126160e436b.tar.gz
prefix-b736fab642e5f3ce519c3b4618595126160e436b.tar.bz2
prefix-b736fab642e5f3ce519c3b4618595126160e436b.zip
bootstrap-prefix: use full path for `do_emerge_pkgs`
In the stage3 bootstrap we always prefer to use tools that have been built for stage3; to accomplish this we ensure that it is the first thing evaluated in PATH. Unfortunately, Portage, Python, and Python-exec are often pulled into the depgraph at some point before we're fully boostrapped. To ensure that we don't try and execute ${EPREFIX}/usr/bin/emerge before we're ready, always provide the full path to the bootstrap Python interpreter and emerge script. Signed-off-by: Matt Jolly <kangie@gentoo.org> Closes: https://github.com/gentoo/prefix/pull/37 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bootstrap-prefix.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index 741f6e6cde..92c3ad1869 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -1785,10 +1785,16 @@ do_emerge_pkgs() {
&& export CFLAGS="${OVERRIDE_CFLAGS}"
[[ -n ${OVERRIDE_CXXFLAGS} ]] \
&& export CXXFLAGS="${OVERRIDE_CXXFLAGS}"
+ # In the stage3 bootstrap we always prefer to use tools that have been built for
+ # stage3; to accomplish this we ensure that it is the first thing evaluated in PATH.
+ # Unfortunately, Portage, Python, and Python-exec are often pulled into the depgraph
+ # at some point before we're fully boostrapped. To ensure that we don't try and execute
+ # ${EPREFIX}/usr/bin/emerge before we're ready, always provide the full path to the
+ # bootstrap Python interpreter and emerge script.
PORTAGE_SYNC_STALE=0 \
FEATURES="-news ${FEATURES}" \
USE="${myuse[*]}" \
- emerge "${eopts[@]}" "${pkg}"
+ "${EPREFIX}"/tmp/bin/python "${EPREFIX}"/tmp/usr/bin/emerge "${eopts[@]}" "${pkg}"
) || return 1
done
}
@@ -3021,7 +3027,7 @@ EOF
exit 1
fi
fi
-
+
if ! [[ -e ${EPREFIX}/.stage1-finished ]] && ! bootstrap_stage1_log ; then
# stage 1 fail
cat << EOF