From b73bd14850491738363f3c8e60519b22d6ece063 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sun, 29 Mar 2020 00:03:02 -0700 Subject: [PATCH] scripts/bootstrap.sh: Emerge the actual libc The python program creates a set of bash variable assignments like myGCC="sys-devel/gcc"; which are used to make a list of packages to be rebuilt during catalyst's stage 2. The toolchain, including libc, is supposed to be rebuilt in this stage, but 'portage.settings.packages' contains 'virtual/libc' and not a provider, so it generates: myLIBC="virtual/libc"; This results in catalyst not rebuilding the libc itself but instead reemerging virtual/libc. Commit b9e8ca9b4aa1 (Make sure we rebuild actual libc and not the virtual package.) tried to fix this, but obviously missed the mark as any testing would have shown. The solution is to have the python program expand the virtual itself. Fixes: b9e8ca9b4aa1 (Make sure we rebuild actual libc and not the virtual package.) Closes: https://bugs.gentoo.org/511694 Signed-off-by: Matt Turner --- scripts/bootstrap.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 03ba014b6372..bfe81ac51ddf 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -259,11 +259,14 @@ done eval $(pycmd ' import portage +from portage.dbapi._expand_new_virt import expand_new_virt import sys +root = portage.settings["EROOT"] for atom in portage.settings.packages: if not isinstance(atom, portage.dep.Atom): atom = portage.dep.Atom(atom.lstrip("*")) varname = "my" + portage.catsplit(atom.cp)[1].upper().replace("-", "_") + atom = list(expand_new_virt(portage.db[root]["vartree"].dbapi, atom))[0] sys.stdout.write("%s=\"%s\"; " % (varname, atom)) ') -- 2.26.2