Fix broken seed stage update...
authorBrian Dolbec <dolsen@gentoo.org>
Tue, 26 Feb 2013 07:31:41 +0000 (23:31 -0800)
committerW. Trevor King <wking@tremily.us>
Sun, 15 Dec 2013 04:25:07 +0000 (20:25 -0800)
Add a check for the update_seed option to set the correct update options.
Fix default seed stage update command to properly update gcc and it's deps.
Add --binpkg-respect-use=y for all cases --usepkg is enabled.
Apply patch to fix broken if logic in the setup_emergeoptions() by Douglas Freed <dwfreed@mtu.edu> and rebase

doc/catalyst-spec.5.txt
targets/stage1/stage1-chroot.sh
targets/support/chroot-functions.sh

index 4a6e06c601a322ecf55dfc50ced9daa47b93bb96..492112f73bfb9c03757ec794570010cd7858ff41 100644 (file)
@@ -138,7 +138,9 @@ 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.
+If not specified, catalyst will update gcc's deps, and rebuild gcc if any of
+it's deps are updated with a new version. Even if it itself is not updated.
+This prevents gcc breakage when it's dependency lib sonames have changed.
 This setting requires enabling update_seed.
 
 Compilation
index 6ef9411764d50bc15e71c5e84f23d4657d64c492..4ddb6360b29064b86bd8be368291fe929ed7c0c9 100755 (executable)
@@ -26,12 +26,17 @@ 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}"
+                       echo "--- Updating seed stage with USER defined update_seed_command"
+                       clst_root_path=/ run_merge "${clst_update_seed_command}"
                else
-                       clst_root_path=/ run_merge "--update --deep --newuse --complete-graph --rebuild-if-new-ver gcc"
+                       echo "--- Updating seed stage with DEFAULT update_seed_command"
+                       update_cmd="--update --deep --complete-graph --rebuild-if-new-ver gcc"
+                       clst_root_path=/ run_merge ${update_cmd}
                fi
+
+               # reset the emerge options for the target
+               clst_update_seed=no setup_myemergeopts
        elif [ "${clst_update_seed}" != "no" ]; then
                echo "Invalid setting for update_seed: ${clst_update_seed}"
                exit 1
index 3c204b30f979148f6e4a8ff3b9c03720aabf8bf2..85a78e72abab2c1f374da4c7ea6fc2a0d520359a 100755 (executable)
@@ -133,10 +133,10 @@ setup_myemergeopts(){
        then
                export bootstrap_opts="${bootstrap_opts} -f"
                export clst_myemergeopts="${clst_myemergeopts} -f"
-       # if we have PKGCACHE, and either update_seed is empty or 'no', make and use binpkgs
        elif [ -n "${clst_PKGCACHE}" ] && [ -z "${clst_update_seed}" -o "${clst_update_seed}" = "no" ]
        then
-               export clst_myemergeopts="${clst_myemergeopts} --usepkg --buildpkg --newuse"
+               # if you add --usepkg, then also add --binpkg-respect-use=y
+               export clst_myemergeopts="${clst_myemergeopts} --usepkg --binpkg-respect-use=y --buildpkg --newuse"
                export bootstrap_opts="${bootstrap_opts} -r"
        fi
 }