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 CC323138334 for ; Wed, 20 Jun 2018 12:06:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8E396E0A81; Wed, 20 Jun 2018 12:06:19 +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 2DA99E0A81 for ; Wed, 20 Jun 2018 12:06:19 +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 84020335CDC for ; Wed, 20 Jun 2018 12:06:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 46C8A2E5 for ; Wed, 20 Jun 2018 12:06:14 +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: <1529496157.ce515e60309e2e2c51577410b111209eec5754d0.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: ce515e60309e2e2c51577410b111209eec5754d0 X-VCS-Branch: master Date: Wed, 20 Jun 2018 12:06:14 +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-Archives-Salt: 08342f4b-ec68-400b-8248-809ec3cede20 X-Archives-Hash: 4d12da444d5729f7260bac52d95379fb commit: ce515e60309e2e2c51577410b111209eec5754d0 Author: Michael Haubenwallner gentoo org> AuthorDate: Wed Jun 20 12:02:37 2018 +0000 Commit: Michael Haubenwallner gentoo org> CommitDate: Wed Jun 20 12:02:37 2018 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=ce515e60 bootstrap-prefix.sh: apply 'stacked-prefix' patch Introducing the 'stacked-prefix' portage FEATURE via temporary patch, subject to be dropped from bootstrap-prefix.sh script once integrated. This replaces commit 8207d9c59468ff32600463033821eec20197ca0f. Closes: https://bugs.gentoo.org/655326 Closes: https://bugs.gentoo.org/655414 scripts/bootstrap-prefix.sh | 71 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index 9c1daa7775..8ba7586747 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -627,6 +627,72 @@ bootstrap_portage() { S="${S}/prefix-portage-${PV}" cd "${S}" + # patch temporary included here: fail when it should be dropped + mkdir -p "${ROOT}"/etc/portage/patches/sys-apps/portage || return 1 + cat > "${ROOT}"/etc/portage/patches/sys-apps/portage/0001-introduce-the-stacked-prefix-FEATURE.patch <<'EOP' +From 902fad63990eb4516d3e3815994b2dcbd16155fd Mon Sep 17 00:00:00 2001 +From: Michael Haubenwallner +Date: Tue, 19 Jun 2018 16:39:12 +0200 +Subject: [PATCH] introduce the 'stacked-prefix' FEATURE + +When we merge into another EPREFIX, but not into some ROOT, +and CHOST is equal to CBUILD, build tools found in EPREFIX +perfectly work for the current build environment. +In a "stacked prefix" we explicitly utilize this situation. + +This is useful during prefix bootstrap (#655414, #655326), but also to +build packages for targets unable to support the full portage toolchain +(native Windows, MinGW), but otherwise do not require a full cross +compilation setup. +--- + bin/phase-helpers.sh | 14 ++++++++++++++ + pym/portage/const.py | 1 + + 2 files changed, 15 insertions(+) + +diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh +index c32533fb3..fea2362cf 100644 +--- a/bin/phase-helpers.sh ++++ b/bin/phase-helpers.sh +@@ -927,6 +927,20 @@ ___best_version_and_has_version_common() { + fi ;; + esac + ++ if ___eapi_has_prefix_variables && ++ has "${root_arg}" '--host-root' '-b' && ++ has stacked-prefix ${FEATURES} && ++ [[ -z ${ROOT%/} ]] && ++ [[ ${CBUILD} == ${CHOST} ]] && ++ [[ ${EPREFIX} != ${BROOT-${PORTAGE_OVERRIDE_EPREFIX}} ]] && ++ :; then ++ # When we merge into another EPREFIX, but not into some ROOT, ++ # and CHOST is equal to CBUILD, build tools found in EPREFIX ++ # perfectly work for the current build environment. ++ # In a "stacked prefix" we explicitly utilize this situation. ++ "${FUNCNAME[1]}" "${atom}" && return 0 ++ fi ++ + if [[ -n $PORTAGE_IPC_DAEMON ]] ; then + cmd+=("${PORTAGE_BIN_PATH}"/ebuild-ipc "${FUNCNAME[1]}" "${root}" "${atom}") + else +diff --git a/pym/portage/const.py b/pym/portage/const.py +index a3d927c3b..ed54425b5 100644 +--- a/pym/portage/const.py ++++ b/pym/portage/const.py +@@ -204,6 +204,7 @@ SUPPORTED_FEATURES = frozenset([ + "splitdebug", + "split-elog", + "split-log", ++ "stacked-prefix", + "strict", + "strict-keepdir", + "stricter", +-- +2.16.1 + +EOP + [[ $? -eq 0 ]] || return 1 + patch -p1 < "${ROOT}"/etc/portage/patches/sys-apps/portage/0001-introduce-the-stacked-prefix-FEATURE.patch || return 1 + # >=2.3 [[ -r bin/repoman ]] || sed -i -e '/repoman/d' {man,bin}/Makefile.in @@ -1645,7 +1711,7 @@ bootstrap_stage3() { # needed with host portage. 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}" \ - FEATURES="${FEATURES} force-prefix" \ + FEATURES="${FEATURES} force-prefix stacked-prefix" \ EMERGE_LOG_DIR="${ROOT}"/var/log \ do_emerge_pkgs "$@" } @@ -1812,6 +1878,9 @@ bootstrap_stage3() { USE="ssl" \ emerge_pkgs "" "${pkgs[@]}" || return 1 + # patch temporary included here: fail when it should be dropped + rm "${ROOT}"/etc/portage/patches/sys-apps/portage/0001-introduce-the-stacked-prefix-FEATURE.patch || return 1 + # Switch to the proper portage. hash -r