Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: scripts/
Date: Sun, 29 Mar 2020 17:45:28
Message-Id: 1585503879.b73bd14850491738363f3c8e60519b22d6ece063.mattst88@gentoo
1 commit: b73bd14850491738363f3c8e60519b22d6ece063
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Sun Mar 29 07:03:02 2020 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 29 17:44:39 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b73bd148
7
8 scripts/bootstrap.sh: Emerge the actual libc
9
10 The python program creates a set of bash variable assignments like
11
12 myGCC="sys-devel/gcc";
13
14 which are used to make a list of packages to be rebuilt during
15 catalyst's stage 2. The toolchain, including libc, is supposed to be
16 rebuilt in this stage, but 'portage.settings.packages' contains
17 'virtual/libc' and not a provider, so it generates:
18
19 myLIBC="virtual/libc";
20
21 This results in catalyst not rebuilding the libc itself but instead
22 reemerging virtual/libc.
23
24 Commit b9e8ca9b4aa1 (Make sure we rebuild actual libc and not the
25 virtual package.) tried to fix this, but obviously missed the mark as
26 any testing would have shown.
27
28 The solution is to have the python program expand the virtual itself.
29
30 Fixes: b9e8ca9b4aa1 (Make sure we rebuild actual libc and not the virtual package.)
31 Closes: https://bugs.gentoo.org/511694
32 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
33
34 scripts/bootstrap.sh | 3 +++
35 1 file changed, 3 insertions(+)
36
37 diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh
38 index 03ba014b637..bfe81ac51dd 100755
39 --- a/scripts/bootstrap.sh
40 +++ b/scripts/bootstrap.sh
41 @@ -259,11 +259,14 @@ done
42
43 eval $(pycmd '
44 import portage
45 +from portage.dbapi._expand_new_virt import expand_new_virt
46 import sys
47 +root = portage.settings["EROOT"]
48 for atom in portage.settings.packages:
49 if not isinstance(atom, portage.dep.Atom):
50 atom = portage.dep.Atom(atom.lstrip("*"))
51 varname = "my" + portage.catsplit(atom.cp)[1].upper().replace("-", "_")
52 + atom = list(expand_new_virt(portage.db[root]["vartree"].dbapi, atom))[0]
53 sys.stdout.write("%s=\"%s\"; " % (varname, atom))
54 ')