Gentoo Archives: gentoo-catalyst

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