Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/catalyst:wip/mattst88 commit in: targets/stage1/
Date: Fri, 29 Jan 2021 23:50:54
Message-Id: 1611418747.b3f782a0725da0f4858cba3e887f973e324755c7.mattst88@gentoo
1 commit: b3f782a0725da0f4858cba3e887f973e324755c7
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 17 23:29:05 2021 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 23 16:19:07 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=b3f782a0
7
8 targets: Update the @changed-subslot set by default
9
10 In portage commit 1789fdf2ee81 (Add @changed-subslot package set) I
11 added this: the set of upgradable packages for which the highest visible
12 version has a different subslot than the currently installed version.
13
14 Updating the entire stage is expensive and unnecessary (since we're
15 going to build the latest packages in stage1 and then rebuild everything
16 in stage3).
17
18 What we definitely do need to update in the original stage3 however, is
19 any package that would trigger a subslot rebuild.
20
21 For example: gcc links with libmpfr.so from dev-libs/mpfr. mpfr's SONAME
22 changes from libmpfr.so.4 (SLOT="0/4") to libmpfr.so.6 (SLOT="0/6"). If
23 the seed stage's dev-libs/mpfr is not updated before emerging gcc, gcc
24 will link with libmpfr.so.4, but the latest version of dev-libs/mpfr
25 will be built and libmpfr.so.6 included into the stage1. Since the old
26 libmpfr.so.4 is not included in the stage1, gcc will not work, breaking
27 subsequent stage builds.
28
29 Our current options to update the seed are too large a hammer (e.g.,
30 "--update --deep --newuse @world" or "--update --deep --newuse
31 --complete-graph --rebuild-if-new-ver gcc") and spend too much time
32 updating seed stages for no gain beyond updating only packages for whom
33 the subslot has changed.
34
35 Bug: https://bugs.gentoo.org/739004
36 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
37
38 targets/stage1/chroot.sh | 2 ++
39 1 file changed, 2 insertions(+)
40
41 diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh
42 index 9b34ced8..08b9da46 100755
43 --- a/targets/stage1/chroot.sh
44 +++ b/targets/stage1/chroot.sh
45 @@ -37,6 +37,8 @@ if [ -n "${clst_update_seed}" ]; then
46 echo "Updating seed stage..."
47 if [ -n "${clst_update_seed_command}" ]; then
48 ROOT=/ run_merge --buildpkg=n "${clst_update_seed_command}"
49 + elif grep -q '^\[changed-subslot\]' /usr/share/portage/config/sets/portage.conf; then
50 + ROOT=/ run_merge --ignore-built-slot-operator-deps y @changed-subslot
51 else
52 ROOT=/ run_merge --update --deep --newuse --complete-graph --rebuild-if-new-ver gcc
53 fi