Fix broken seed stage update...
authorBrian Dolbec <dolsen@gentoo.org>
Tue, 26 Feb 2013 07:31:41 +0000 (23:31 -0800)
committerBrian Dolbec <dolsen@gentoo.org>
Wed, 29 May 2013 03:39:30 +0000 (20:39 -0700)
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 97aef7fa6b005f70e7e0d57bd43f8aa731f9adcb..a5d6a012892bfdd45f50e6f3c2845a456961f862 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 "--buildpkg=n --update --deep --newuse --onlydeps 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 2524b4f732260ea9105d7a1a5ecfb40e59a76746..39bb1cde268fb5c46c51af404a950fda3a74a7b1 100755 (executable)
@@ -133,9 +133,10 @@ setup_myemergeopts(){
        then
                export bootstrap_opts="${bootstrap_opts} -f"
                export clst_myemergeopts="${clst_myemergeopts} -f"
-       elif [ -n "${clst_PKGCACHE}" ]
+       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
 }