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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E5375138239 for ; Tue, 29 Jan 2019 15:59:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1F458E0C40; Tue, 29 Jan 2019 15:59:10 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E29CFE0C4A for ; Tue, 29 Jan 2019 15:59:09 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3F16D335D96 for ; Tue, 29 Jan 2019 15:59:08 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9077F527 for ; Tue, 29 Jan 2019 15:59:06 +0000 (UTC) From: "Michael Haubenwallner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michael Haubenwallner" Message-ID: <1548772977.9e84e77e779219d209a2474a7f04bfcd81212e6a.haubi@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: haubi X-VCS-Committer-Name: Michael Haubenwallner X-VCS-Revision: 9e84e77e779219d209a2474a7f04bfcd81212e6a X-VCS-Branch: master Date: Tue, 29 Jan 2019 15:59:06 +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: c6ba07f5-b41a-4dd4-9172-d1d8c894b8d2 X-Archives-Hash: f69090dd2e85109ab76fdb9171f50d76 commit: 9e84e77e779219d209a2474a7f04bfcd81212e6a Author: Michael Haubenwallner gentoo org> AuthorDate: Mon Jan 28 20:22:42 2019 +0000 Commit: Michael Haubenwallner gentoo org> CommitDate: Tue Jan 29 14:42:57 2019 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=9e84e77e bootstrap-prefix.sh: selectively use stacked-prefix Use stacked prefix only up to before merging sys-apps/portage itself with dependencies, even for RAP now. Closes: https://bugs.gentoo.org/676096 Signed-off-by: Michael Haubenwallner gentoo.org> scripts/bootstrap-prefix.sh | 55 +++++++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index d74a35372d..f5be868d77 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -1736,12 +1736,22 @@ bootstrap_stage3() { # PORTAGE_OVERRIDE_EPREFIX as BROOT is needed. PREROOTPATH="${ROOT}"$(echo /{,tmp/}{usr/,}{,lib/llvm/{10,9,8,7,6,5}/}{s,}bin | sed "s, ,:${ROOT},g") \ EPREFIX="${ROOT}" PORTAGE_TMPDIR="${PORTAGE_TMPDIR}" \ - PORTAGE_OVERRIDE_EPREFIX="$(rapx "${ROOT}" "${ROOT}"/tmp)" \ - FEATURES="${FEATURES} force-prefix $(rapx "" stacked-prefix)" \ + FEATURES="${FEATURES} force-prefix" \ EMERGE_LOG_DIR="${ROOT}"/var/log \ do_emerge_pkgs "$@" } + with_stack_emerge_pkgs() { + FEATURES="${FEATURES} stacked-prefix" \ + PORTAGE_OVERRIDE_EPREFIX="${ROOT}/tmp" \ + emerge_pkgs "$@" + } + + without_stack_emerge_pkgs() { + PORTAGE_OVERRIDE_EPREFIX="${ROOT}" \ + emerge_pkgs "$@" + } + # Some packages fail to properly depend on sys-apps/texinfo. # We don't really need that package, so we fake it instead, # explicitly emerging it later on will overwrite the fakes. @@ -1751,13 +1761,6 @@ bootstrap_stage3() { fi if is-rap ; then - # Bug 655414. Copy portage global config from stage2 - # to stage3. - if [[ ! -d "${ROOT}"/usr/share/portage ]]; then - mkdir -p "${ROOT}"/usr/share - cp -a "${ROOT}"{/tmp,}/usr/share/portage - fi - # We need ${ROOT}/usr/bin/perl to merge glibc. if [[ ! -x "${ROOT}"/usr/bin/perl ]]; then # trick "perl -V:apiversion" check of glibc-2.19. @@ -1779,7 +1782,7 @@ bootstrap_stage3() { ) BOOTSTRAP_RAP=yes \ - emerge_pkgs --nodeps "${pkgs[@]}" || return 1 + with_stack_emerge_pkgs --nodeps "${pkgs[@]}" || return 1 grep -q 'apiversion=9999' "${ROOT}"/usr/bin/perl && rm "${ROOT}"/usr/bin/perl pkgs=( @@ -1791,7 +1794,7 @@ bootstrap_stage3() { RAP_DLINKER=$(echo "${ROOT}"/$(get_libdir)/ld*.so.[0-9]) export LDFLAGS="-L${ROOT}/usr/$(get_libdir) -Wl,--dynamic-linker=${RAP_DLINKER}" BOOTSTRAP_RAP=yes \ - emerge_pkgs --nodeps "${pkgs[@]}" || return 1 + with_stack_emerge_pkgs --nodeps "${pkgs[@]}" || return 1 # remove stage2 ld so that stage3 ld is used by stage2 gcc. [[ -f ${ROOT}/tmp/usr/${CHOST}/bin/ld ]] && mv ${ROOT}/tmp/usr/${CHOST}/bin/ld{,.stage2} @@ -1809,7 +1812,7 @@ bootstrap_stage3() { ${linker} ) - emerge_pkgs --nodeps "${pkgs[@]}" || return 1 + with_stack_emerge_pkgs --nodeps "${pkgs[@]}" || return 1 fi # On some hosts, gcc gets confused now when it uses the new linker, @@ -1843,9 +1846,12 @@ bootstrap_stage3() { EXTRA_ECONF="--disable-compiler-version-checks $(rapx --disable-lto)" \ MYCMAKEARGS="-DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=OFF" \ PYTHON_COMPAT_OVERRIDE=python2.7 \ - emerge_pkgs --nodeps ${compiler} || return 1 + with_stack_emerge_pkgs --nodeps ${compiler} || return 1 # undo libgcc_s.so path of stage2 + # now we have the compiler right there + unset CXX CPPFLAGS LDFLAGS + # On Darwin we have llvm-3.5 at this point, which provides nm. # However for some reason this nm doesn't quite get it on newer # platforms at least, resulting in bugs like #598336. To cater for @@ -1864,7 +1870,10 @@ bootstrap_stage3() { export PREROOTPATH="${ROOT}/usr/bin:${ROOT}/bin" # get a sane bash, overwriting tmp symlinks - emerge_pkgs "" "app-shells/bash" || return 1 + with_stack_emerge_pkgs "" "app-shells/bash" || return 1 + + # now we have a shell right there + unset CONFIG_SHELL # Build portage and dependencies. pkgs=( @@ -1884,7 +1893,7 @@ bootstrap_stage3() { # OSX, confusing the buildsystem ac_cv_c_decl_report=warning \ TIME_T_32_BIT_OK=yes \ - emerge_pkgs "" "${pkgs[@]}" || return 1 + with_stack_emerge_pkgs "" "${pkgs[@]}" || return 1 if [[ ! -x "${ROOT}"/sbin/openrc-run ]]; then echo "We need openrc-run at ${ROOT}/sbin to merge rsync." \ @@ -1899,11 +1908,23 @@ bootstrap_stage3() { sys-devel/gettext sys-apps/portage ) + + # Bug 655414, 676096. + # Enough packages emerged using stacked-prefix with tmp/ as base prefix + # to allow for sys-apps/portage itself and dependencies without any + # dependency into tmp/ now. + # Portage does search it's global config using PORTAGE_OVERRIDE_EPREFIX, + # so we need to provide it there - emerging portage itself is expected + # to finally overwrite it. + if [[ ! -d "${ROOT}"/usr/share/portage ]]; then + mkdir -p "${ROOT}"/usr/share + cp -a "${ROOT}"{/tmp,}/usr/share/portage + fi + USE="ssl" \ - emerge_pkgs "" "${pkgs[@]}" || return 1 + without_stack_emerge_pkgs "" "${pkgs[@]}" || return 1 # Switch to the proper portage. - unset CONFIG_SHELL CXX CPPFLAGS LDFLAGS hash -r # Update the portage tree.