From: Brian Dolbec Date: Tue, 26 Feb 2013 07:31:41 +0000 (-0800) Subject: Fix broken seed stage update... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ff4c84ea13d69248082aa326f5e8614e65ee4464;p=catalyst.git Fix broken seed stage update... 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 and rebase --- diff --git a/doc/catalyst-spec.5.txt b/doc/catalyst-spec.5.txt index 4a6e06c6..492112f7 100644 --- a/doc/catalyst-spec.5.txt +++ b/doc/catalyst-spec.5.txt @@ -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 diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh index 6ef94117..4ddb6360 100755 --- a/targets/stage1/stage1-chroot.sh +++ b/targets/stage1/stage1-chroot.sh @@ -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 diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh index 3c204b30..85a78e72 100755 --- a/targets/support/chroot-functions.sh +++ b/targets/support/chroot-functions.sh @@ -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 }