In portage commit 1789fdf2ee81 (Add @changed-subslot package set) I
added this: the set of upgradable packages for which the highest visible
version has a different subslot than the currently installed version.

Updating the entire stage is expensive and unnecessary (since we're
going to build the latest packages in stage1 and then rebuild everything
in stage3).

What we definitely do need to update in the original stage3 however, is
any package that would trigger a subslot rebuild.

For example: gcc links with libmpfr.so from dev-libs/mpfr. mpfr's SONAME
changes from libmpfr.so.4 (SLOT="0/4") to libmpfr.so.6 (SLOT="0/6"). If
the seed stage's dev-libs/mpfr is not updated before emerging gcc, gcc
will link with libmpfr.so.4, but the latest version of dev-libs/mpfr
will be built and libmpfr.so.6 included into the stage1. Since the old
libmpfr.so.4 is not included in the stage1, gcc will not work, breaking
subsequent stage builds.

Our current options to update the seed are too large a hammer (e.g.,
"--update --deep --newuse @world" or "--update --deep --newuse
--complete-graph --rebuild-if-new-ver gcc") and spend too much time
updating seed stages for no gain beyond updating only packages for whom
the subslot has changed.

Bug: https://bugs.gentoo.org/739004
Signed-off-by: Matt Turner <matts...@gentoo.org>
---
 targets/stage1/chroot.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh
index e5a3e0b0..a1818425 100755
--- a/targets/stage1/chroot.sh
+++ b/targets/stage1/chroot.sh
@@ -40,6 +40,8 @@ if [ -n "${clst_update_seed}" ]; then
 
                if [ -n "${clst_update_seed_command}" ]; then
                        ROOT=/ run_merge --buildpkg=n 
"${clst_update_seed_command}"
+               elif grep -q '^\[changed-subslot\]' 
/usr/share/portage/config/sets/portage.conf; then
+                       ROOT=/ run_merge --ignore-built-slot-operator-deps y 
@changed-subslot
                else
                        ROOT=/ run_merge --update --deep --newuse 
--complete-graph --rebuild-if-new-ver gcc
                fi
-- 
2.26.2


Reply via email to