commit: 89a60c873d3de303c863e06429f0405c164186ac Author: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org> AuthorDate: Sun Aug 30 22:55:11 2015 +0000 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> CommitDate: Sun Aug 30 22:55:49 2015 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=89a60c87
Move the code to deal with USE="bindist" to run_merge so we don't need to replicate it on all <target>-chroot.sh files. Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo.org> targets/livecd-stage1/livecd-stage1-chroot.sh | 6 ------ targets/stage1/stage1-chroot.sh | 7 ------- targets/stage3/stage3-chroot.sh | 6 ------ targets/support/chroot-functions.sh | 6 ++++++ 4 files changed, 6 insertions(+), 19 deletions(-) diff --git a/targets/livecd-stage1/livecd-stage1-chroot.sh b/targets/livecd-stage1/livecd-stage1-chroot.sh index d3b4674..9ddf8d4 100755 --- a/targets/livecd-stage1/livecd-stage1-chroot.sh +++ b/targets/livecd-stage1/livecd-stage1-chroot.sh @@ -5,10 +5,4 @@ source /tmp/chroot-functions.sh ## START BUILD setup_pkgmgr -# Set the bindist USE flag if clst_BINDIST is set -[ -e ${clst_make_conf} ] && [ -n "${clst_BINDIST}" ] && echo "USE=\"${USE} bindist\"" >> ${clst_make_conf} - run_merge --update --deep --newuse "${clst_packages}" - -# Clean-up USE again -sed -i "/USE=\"${USE} bindist\"/d" ${clst_make_conf} diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh index 2853f04..028089e 100755 --- a/targets/stage1/stage1-chroot.sh +++ b/targets/stage1/stage1-chroot.sh @@ -27,19 +27,12 @@ clst_root_path=/ setup_pkgmgr "build" # Update stage3 if [ -n "${clst_update_seed}" ]; then if [ "${clst_update_seed}" == "yes" ]; then - # Set USE flags build and bindist if clst_BINDIST is set - [ -e ${clst_make_conf} ] && echo "USE=\"${USE} build ${BINDIST}\"" >> ${clst_make_conf} - 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 "--update --deep --newuse --complete-graph --rebuild-if-new-ver gcc" fi - - # Clean-up USE again - sed -i "/USE=\"${USE} build ${BINDIST}\"/d" ${clst_make_conf} - elif [ "${clst_update_seed}" != "no" ]; then echo "Invalid setting for update_seed: ${clst_update_seed}" exit 1 diff --git a/targets/stage3/stage3-chroot.sh b/targets/stage3/stage3-chroot.sh index d46234c..6cf9106 100755 --- a/targets/stage3/stage3-chroot.sh +++ b/targets/stage3/stage3-chroot.sh @@ -5,10 +5,4 @@ source /tmp/chroot-functions.sh ## START BUILD setup_pkgmgr -# Set bindist USE flag if clst_BINDIST is set -[ -e ${clst_make_conf} ] && [ -n "${clst_BINDIST}" ] && echo "USE=\"${USE} bindist\"" >> ${clst_make_conf} - run_merge "-e @system" - -# Clean-up USE again -sed -i "/USE=\"${USE} bindist\"/d" ${clst_make_conf} diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh index 7184984..95904b3 100755 --- a/targets/support/chroot-functions.sh +++ b/targets/support/chroot-functions.sh @@ -269,6 +269,9 @@ run_merge() { export EPAUSE_IGNORE=0 export CONFIG_PROTECT="-*" + # Set bindist USE flag if clst_BINDIST is set + [ -e ${clst_make_conf} ] && [ -n "${clst_BINDIST}" ] && echo "USE=\"${USE} bindist\"" >> ${clst_make_conf} + if [ -n "${clst_VERBOSE}" ] then echo "ROOT=${ROOT} emerge ${clst_myemergeopts} -pt $@" || exit 1 @@ -285,6 +288,9 @@ run_merge() { echo "emerge ${clst_myemergeopts} $@" || exit 1 emerge ${clst_myemergeopts} $@ || exit 1 + + # Clean-up USE again + sed -i "/USE=\"${USE} bindist\"/d" ${clst_make_conf} } show_debug() {