From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 18FBF1581D3 for ; Tue, 28 May 2024 12:43:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5197AE29F2; Tue, 28 May 2024 12:43:14 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2DF27E29F2 for ; Tue, 28 May 2024 12:43:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 286F133C84E for ; Tue, 28 May 2024 12:43:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8F28A1BD9 for ; Tue, 28 May 2024 12:43:11 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1716900187.b736fab642e5f3ce519c3b4618595126160e436b.sam@gentoo> Subject: [gentoo-commits] repo/proj/prefix:master commit in: scripts/ X-VCS-Repository: repo/proj/prefix X-VCS-Files: scripts/bootstrap-prefix.sh X-VCS-Directories: scripts/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: b736fab642e5f3ce519c3b4618595126160e436b X-VCS-Branch: master Date: Tue, 28 May 2024 12:43:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 1ee8c1a5-c70f-4a1b-8396-ca1120f5eae8 X-Archives-Hash: c27f393199772d085a623f8bdd6eeb92 commit: b736fab642e5f3ce519c3b4618595126160e436b Author: Matt Jolly gentoo org> AuthorDate: Tue May 28 03:36:52 2024 +0000 Commit: Sam James gentoo org> CommitDate: Tue May 28 12:43:07 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=b736fab6 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 gentoo.org> Closes: https://github.com/gentoo/prefix/pull/37 Signed-off-by: Sam James gentoo.org> scripts/bootstrap-prefix.sh | 10 ++++++++-- 1 file 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