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 ED86A158041 for ; Sat, 24 Feb 2024 09:55:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 39B9CE2A10; Sat, 24 Feb 2024 09:55:46 +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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EB312E2A1A for ; Sat, 24 Feb 2024 09:55:45 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F3E9A34300D for ; Sat, 24 Feb 2024 09:55:44 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 901CD118C for ; Sat, 24 Feb 2024 09:55:43 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1708768540.ca158662df56bb58d15a876ba1141dd7e808a628.grobian@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: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: ca158662df56bb58d15a876ba1141dd7e808a628 X-VCS-Branch: master Date: Sat, 24 Feb 2024 09:55:43 +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: 2247e858-f782-4dd1-9458-adc4905cd727 X-Archives-Hash: 6ebc526e29ed6950c5b54c804e29ed51 commit: ca158662df56bb58d15a876ba1141dd7e808a628 Author: Fabian Groffen gentoo org> AuthorDate: Sat Feb 24 09:49:39 2024 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sat Feb 24 09:55:40 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=ca158662 scripts/bootstrap-prefix: avoid final emerge -e @system Long time ago, when we started bootstraps, all stages were done straight into the destination Prefix, which meant tools could link to the host and/or configured in an odd way where packages would refer to (config) files from the host. To make sure all of that was set straight, the blunt tool emerge -e @system was run as last step to make sure everything came from Portage proper. Today, we bootstrap in early stages in EPREFIX/tmp and even set up a Portage instance there that will use tools that may or may not come from host or be configured to use it. However, it cleanly pulls itself out of the mud by letting Portage install @system in the destination Prefix, thus it compiles every package it needs with the requirements as set out by the ebuilds. Thus there is no need to really recompile everything all over again. It should be fine with a simple recompile of all packages for which USE-flags changed after we lifted some overrides to avoid circular or unnecessary deps. Signed-off-by: Fabian Groffen gentoo.org> scripts/bootstrap-prefix.sh | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index 349a81876d..0612b7af5d 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -1734,8 +1734,8 @@ do_emerge_pkgs() { # Disable the STALE warning because the snapshot frequently gets stale. # - # Need need to spam the user about news until the emerge -e system - # because the tools aren't available to read the news item yet anyway. + # No need to spam the user about news until the final emerge @world + # because the tools aren't available to read the news items yet anyway. # # Avoid circular deps caused by the default profiles (and IUSE # defaults). @@ -2279,9 +2279,10 @@ bootstrap_stage3() { export USE="-git -crypt -http2" # Portage should figure out itself what it needs to do, if anything. - einfo "running emerge -uDNv system" - estatus "stage3: emerge -uDNv system" - emerge --color n -uDNv system || return 1 + eflags="--deep --update --changed-use @system" + einfo "running emerge ${eflags}" + estatus "stage3: emerge ${eflags}" + emerge --color n -v ${eflags} || return 1 # Remove anything that we don't need (compilers most likely) einfo "running emerge --depclean" @@ -2931,8 +2932,9 @@ OK! I'm going to give it a try, this is what I have collected sofar: I'm now going to make an awful lot of noise going through a sequence of stages to make your box as groovy as I am myself, setting up your Prefix. In short, I'm going to run stage1, stage2, stage3, followed by -emerge -e system. If any of these stages fail, both you and me are in -deep trouble. So let's hope that doesn't happen. +an emerge to do a finel update to your system. If any of these stages +fail, both you and me are in deep trouble. So let's hope that doesn't +happen. EOF echo [[ ${TODO} == 'noninteractive' ]] && ans="" || @@ -3088,7 +3090,7 @@ EOF [[ ${STOP_BOOTSTRAP_AFTER} == stage3 ]] && exit 0 - local cmd="emerge -v -e system" + local cmd="emerge -v --deep --update --changed-use @world" if [[ -e ${EPREFIX}/var/cache/edb/mtimedb ]] && \ grep -q resume "${EPREFIX}"/var/cache/edb/mtimedb ; then @@ -3096,7 +3098,7 @@ EOF fi einfo "running ${cmd}" if ${cmd} ; then - # Now, after 'emerge -e system', we can get rid of the temporary tools. + # Now, we've got everything in $ROOT, we can get rid of /tmp if [[ -d ${EPREFIX}/tmp/var/tmp ]] ; then rm -Rf "${EPREFIX}"/tmp || return 1 mkdir -p "${EPREFIX}"/tmp || return 1 @@ -3104,7 +3106,7 @@ EOF hash -r # tmp/* stuff is removed in stage3 else - # emerge -e system fail + # emerge @world fail cat << EOF Oh yeah, I thought I was almost there, and then this! I did