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: scripts/
Date: Tue, 28 Jan 2020 15:51:22
Message-Id: 1580226670.5d5525ff57e9f0e28a17ea63aac19739cb5e77de.haubi@gentoo
1 commit: 5d5525ff57e9f0e28a17ea63aac19739cb5e77de
2 Author: Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 28 15:43:29 2020 +0000
4 Commit: Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 28 15:51:10 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=5d5525ff
7
8 bootstrap-prefix.sh: fix circular deps in stage3
9
10 In prefix guest, when about to "with_stack_emerge_pkgs sys-apps/grep",
11 portage fails with circular dependencies potentially breakable with
12 USE=-berkdb, although we do set the USE=-berkdb environment variable.
13 The problem here is that USE=-berkdb does apply to the stacked prefix
14 only, not the base prefix, so we need to persist the base prefix' USE
15 flags when we are about to do "with_stack_emerge_pkgs", even if this is
16 not a problem with RAP right now, maybe because of a different tree.
17
18 Signed-off-by: Michael Haubenwallner <haubi <AT> gentoo.org>
19
20 scripts/bootstrap-prefix.sh | 11 +++++++++++
21 1 file changed, 11 insertions(+)
22
23 diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
24 index 2c26201141..7bb3e9df35 100755
25 --- a/scripts/bootstrap-prefix.sh
26 +++ b/scripts/bootstrap-prefix.sh
27 @@ -1556,6 +1556,17 @@ do_emerge_pkgs() {
28 clang
29 internal-glib
30 )
31 + if [[ " ${USE} " == *" prefix-stack "* ]] &&
32 + [[ ${PORTAGE_OVERRIDE_EPREFIX} == */tmp ]] &&
33 + ! grep -q '^USE=".*" # by bootstrap-prefix.sh$' "${PORTAGE_OVERRIDE_EPREFIX}/etc/portage/make.conf"
34 + then
35 + # With prefix-stack, the USE env var does apply to the stacked
36 + # prefix only, not the base prefix (any more? since some portage
37 + # version?), so we have to persist the base USE flags into the
38 + # base prefix - without the additional incoming USE flags.
39 + echo "USE=\"\${USE} ${myuse[*]}\" # by bootstrap-prefix.sh" \
40 + >> "${PORTAGE_OVERRIDE_EPREFIX}/etc/portage/make.conf"
41 + fi
42 myuse=" ${myuse[*]} "
43 local use
44 for use in ${USE} ; do