Gentoo Archives: gentoo-commits

From: Michael Haubenwallner <haubi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/prefix:master commit in: sys-apps/portage/files/, sys-apps/portage/
Date: Fri, 22 Jun 2018 14:34:37
Message-Id: 1529675109.b69fe7bafe8c39c105de5545dc3903af76f233f4.haubi@gentoo
1 commit: b69fe7bafe8c39c105de5545dc3903af76f233f4
2 Author: Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 22 13:34:27 2018 +0000
4 Commit: Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 22 13:45:09 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=b69fe7ba
7
8 sys-apps/portage: add the stacked-prefix patch (#658572)
9
10 Package-Manager: Portage-2.3.24, Repoman-2.3.6
11
12 .../files/portage-2.3.40-stacked-prefix.patch | 59 ++++++++++++++++++++++
13 sys-apps/portage/portage-2.3.40.2.ebuild | 3 +-
14 2 files changed, 61 insertions(+), 1 deletion(-)
15
16 diff --git a/sys-apps/portage/files/portage-2.3.40-stacked-prefix.patch b/sys-apps/portage/files/portage-2.3.40-stacked-prefix.patch
17 new file mode 100644
18 index 0000000000..d967d1faf7
19 --- /dev/null
20 +++ b/sys-apps/portage/files/portage-2.3.40-stacked-prefix.patch
21 @@ -0,0 +1,59 @@
22 +From 8a121d477a9a13569be3fb50eaeaa1162ed884bd Mon Sep 17 00:00:00 2001
23 +From: Michael Haubenwallner <haubi@g.o>
24 +Date: Tue, 19 Jun 2018 16:39:12 +0200
25 +Subject: [PATCH 1/2] introduce the 'stacked-prefix' FEATURE
26 +
27 +When we merge into another EPREFIX, but not into some ROOT,
28 +and CHOST is equal to CBUILD, build tools found in EPREFIX
29 +perfectly work for the current build environment.
30 +In a "stacked prefix" we explicitly utilize this situation.
31 +
32 +This is useful during prefix bootstrap (#655414, #655326), but also to
33 +build packages for targets unable to support the full portage toolchain
34 +(native Windows, MinGW), but otherwise do not require a full cross
35 +compilation setup.
36 +---
37 + bin/phase-helpers.sh | 14 ++++++++++++++
38 + pym/portage/const.py | 1 +
39 + 2 files changed, 15 insertions(+)
40 +
41 +diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
42 +index 75d92b407..c5a818db7 100644
43 +--- a/bin/phase-helpers.sh
44 ++++ b/bin/phase-helpers.sh
45 +@@ -927,6 +927,20 @@ ___best_version_and_has_version_common() {
46 + fi ;;
47 + esac
48 +
49 ++ if ___eapi_has_prefix_variables &&
50 ++ has "${root_arg}" '--host-root' '-b' &&
51 ++ has stacked-prefix ${FEATURES} &&
52 ++ [[ -z ${ROOT%/} ]] &&
53 ++ [[ ${CBUILD} == ${CHOST} ]] &&
54 ++ [[ ${EPREFIX} != ${BROOT-${PORTAGE_OVERRIDE_EPREFIX}} ]] &&
55 ++ :; then
56 ++ # When we merge into another EPREFIX, but not into some ROOT,
57 ++ # and CHOST is equal to CBUILD, build tools found in EPREFIX
58 ++ # perfectly work for the current build environment.
59 ++ # In a "stacked prefix" we explicitly utilize this situation.
60 ++ "${FUNCNAME[1]}" "${atom}" && return 0
61 ++ fi
62 ++
63 + if [[ -n $PORTAGE_IPC_DAEMON ]] ; then
64 + cmd+=("${PORTAGE_BIN_PATH}"/ebuild-ipc "${FUNCNAME[1]}" "${root}" "${atom}")
65 + else
66 +diff --git a/pym/portage/const.py b/pym/portage/const.py
67 +index d9c57f300..be7bf1036 100644
68 +--- a/pym/portage/const.py
69 ++++ b/pym/portage/const.py
70 +@@ -203,6 +203,7 @@ SUPPORTED_FEATURES = frozenset([
71 + "splitdebug",
72 + "split-elog",
73 + "split-log",
74 ++ "stacked-prefix",
75 + "strict",
76 + "strict-keepdir",
77 + "stricter",
78 +--
79 +2.16.1
80 +
81
82 diff --git a/sys-apps/portage/portage-2.3.40.2.ebuild b/sys-apps/portage/portage-2.3.40.2.ebuild
83 index 8e6b1c32a5..63935aaa09 100644
84 --- a/sys-apps/portage/portage-2.3.40.2.ebuild
85 +++ b/sys-apps/portage/portage-2.3.40.2.ebuild
86 @@ -92,7 +92,8 @@ python_prepare_all() {
87 distutils-r1_python_prepare_all
88
89 epatch "${FILESDIR}"/${PN}-2.3.40-ebuildshell.patch # 155161
90 - use prefix-chaining &&
91 + epatch "${FILESDIR}"/${PN}-2.3.40-stacked-prefix.patch # 658572
92 + use prefix-chaining && # maybe useful even with stacked-prefix
93 epatch "${FILESDIR}"/${PN}-2.3.40-prefix-chaining.patch
94
95 if use native-extensions; then