Remove update_seed_command and strengthen update_seed rebuild
authorW. Trevor King <wking@tremily.us>
Fri, 8 Mar 2013 17:00:23 +0000 (12:00 -0500)
committerW. Trevor King <wking@tremily.us>
Fri, 8 Mar 2013 17:22:43 +0000 (12:22 -0500)
When using `update_seed` to get a 20121213 stage3 from
libmpc.so.2 to libmpc.so.3, stage2 failed with:

  /usr/libexec/gcc/i686-pc-linux-gnu/4.6.3/cc1:
    error while loading shared libraries: libmpc.so.2:
    cannot open shared object file: No such file or directory

This was due to an mpc version bump in the Portage tree that was not
present in the stage3 I used to seed stage1.  Stage1 wasn't
recompiling GCC against the new mpc, so it ended up with GCC linking
against the old mpc.  Heading into stage2, the old mpc (from the seed
stage3) was no longer present, so compilation crashed and burned.

To fix this, we should be extra agressive about rebuilding packages
when their dependencies change in stage1.  The earlier update_seed
command was not catching the bumped mpc, so add:

  --complete-graph --with-bdeps=y --rebuild-if-new-ver

to toughen things up.

This is a general dependency problem (not GCC specific), so I also
replaced the gcc target with:

  @world @system

This leads to a lot of rebuilding, but it should be a stable and
general fix.  With a general fix there's no more need to allow
user-specific overrides with update_seed_command, and that option was
removed.

Based-on-patch-by: Brian Dolbec <dolsen@gentoo.org>
doc/catalyst-spec.5.txt
modules/stage1_target.py
targets/stage1/stage1-chroot.sh

index 4a6e06c601a322ecf55dfc50ced9daa47b93bb96..a928557d3250916b9d56b63cc4e9d3ac3ce6a246 100644 (file)
@@ -135,12 +135,6 @@ one CD, this defines the layout for the directories under
 This is an optional setting supported by stage1 to tell catalyst if
 it should update the seed stage or not (valid values: `yes no`).
 
-*update_seed_command*::
-This is an optional command to pass to emerge for updating the seed
-stage (example: `--update dev-libs/mpfr dev-libs/mpc dev-libs/gmp`)
-If not specified, catalyst will update gcc deps.
-This setting requires enabling update_seed.
-
 Compilation
 ~~~~~~~~~~~
 
index aa4392664e35d471c48e33e1f75939befaf6e84c..7a6c860b954e0f20f24483a02e15b777632466ba 100644 (file)
@@ -13,7 +13,7 @@ class stage1_target(generic_stage_target):
        def __init__(self,spec,addlargs):
                self.required_values=[]
                self.valid_values=["chost"]
-               self.valid_values.extend(["update_seed","update_seed_command"])
+               self.valid_values.extend(["update_seed"])
                generic_stage_target.__init__(self,spec,addlargs)
 
        def set_stage_path(self):
index 3f628c22cfcb97ba45fa01b594c17b0cc465b7f8..3dad53d130660c5d3e97cc92931fc1afcb38edd7 100644 (file)
@@ -26,12 +26,9 @@ clst_root_path=/ setup_pkgmgr
 # Update stage3
 if [ -n "${clst_update_seed}" ]; then
        if [ "${clst_update_seed}" == "yes" ]; then
-               echo "Updating seed stage..."
-               if [ -n "${clst_update_seed_command}" ]; then
-                       clst_root_path=/ run_merge "--buildpkg=n ${clst_update_seed_command}"
-               else
-                       clst_root_path=/ run_merge "--buildpkg=n --update --deep --newuse --onlydeps gcc"
-               fi
+               update_cmd="--update --deep --complete-graph --with-bdeps=y --rebuild-if-new-ver @world @system"
+               echo "--- Updating seed stage with: ${update_cmd}"
+               clst_root_path=/ run_merge "${update_cmd}"
        elif [ "${clst_update_seed}" != "no" ]; then
                echo "Invalid setting for update_seed: ${clst_update_seed}"
                exit 1