Skip to content

Commit 900d4d2

Browse files
committed
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 <[email protected]>
1 parent e3da80a commit 900d4d2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

scripts/bootstrap-prefix.sh

+8-2
Original file line numberDiff line numberDiff line change
@@ -1785,10 +1785,16 @@ do_emerge_pkgs() {
17851785
&& export CFLAGS="${OVERRIDE_CFLAGS}"
17861786
[[ -n ${OVERRIDE_CXXFLAGS} ]] \
17871787
&& export CXXFLAGS="${OVERRIDE_CXXFLAGS}"
1788+
# In the stage3 bootstrap we always prefer to use tools that have been built for
1789+
# stage3; to accomplish this we ensure that it is the first thing evaluated in PATH.
1790+
# Unfortunately, Portage, Python, and Python-exec are often pulled into the depgraph
1791+
# at some point before we're fully boostrapped. To ensure that we don't try and execute
1792+
# ${EPREFIX}/usr/bin/emerge before we're ready, always provide the full path to the
1793+
# bootstrap Python interpreter and emerge script.
17881794
PORTAGE_SYNC_STALE=0 \
17891795
FEATURES="-news ${FEATURES}" \
17901796
USE="${myuse[*]}" \
1791-
emerge "${eopts[@]}" "${pkg}"
1797+
"${EPREFIX}"/tmp/bin/python "${EPREFIX}"/tmp/usr/bin/emerge "${eopts[@]}" "${pkg}"
17921798
) || return 1
17931799
done
17941800
}
@@ -3021,7 +3027,7 @@ EOF
30213027
exit 1
30223028
fi
30233029
fi
3024-
3030+
30253031
if ! [[ -e ${EPREFIX}/.stage1-finished ]] && ! bootstrap_stage1_log ; then
30263032
# stage 1 fail
30273033
cat << EOF

0 commit comments

Comments
 (0)