commit:     e36de6ebc36ea3c1163226c587f298855a9983d8
Author:     Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 11 03:32:07 2015 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Fri Sep 11 03:32:07 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e36de6eb

port workaround for bug #560166 to stage2 bootstrap and leave a note so that is 
not missed next time

 targets/stage2/stage2-chroot.sh     | 12 +++++++++++-
 targets/support/chroot-functions.sh |  3 ++-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/targets/stage2/stage2-chroot.sh b/targets/stage2/stage2-chroot.sh
index 519db79..0e21ea6 100755
--- a/targets/stage2/stage2-chroot.sh
+++ b/targets/stage2/stage2-chroot.sh
@@ -18,10 +18,20 @@ then
 fi
 
 # Set bindist USE flag if clst_BINDIST is set
-[ -e "${clst_make_conf}" ] && [ -n "${clst_BINDIST}" ] && echo "USE=\"\${USE} 
bindist\"" >> "${clst_make_conf}"
+# The bindist functions have been taken from support/chroot-functions.sh
+if [ -e "${clst_make_conf}" ] && [ -n "${clst_BINDIST}" ]; then
+       if grep -q ^USE "${clst_make_conf}"; then
+               echo "USE=\"\${USE} bindist\"" >> "${clst_make_conf}"
+       else
+               echo "USE=\"bindist\"" >> "${clst_make_conf}"
+       fi
+fi
+
+
 
 ## START BUILD
 /usr/portage/scripts/bootstrap.sh ${bootstrap_opts} || exit 1
 
 # Clean-up USE again
 sed -i "/USE=\"\${USE} bindist\"/d" "${clst_make_conf}"
+sed -i "/USE=\"bindist\"/d" "${clst_make_conf}"

diff --git a/targets/support/chroot-functions.sh 
b/targets/support/chroot-functions.sh
index 68622f2..327705f 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -167,6 +167,7 @@ setup_gcc(){
 
 setup_pkgmgr(){
        # Set bindist USE flag if clst_BINDIST is set
+       # this is handled independantly in stage2, changes here should be 
mirrored there
        if [ "${clst_target}" != "stage1" ] && [ -e "${clst_make_conf}" ] \
                && [ -n "${clst_BINDIST}" ]; then
                if grep -q ^USE "${clst_make_conf}"; then
@@ -174,7 +175,6 @@ setup_pkgmgr(){
                else
                        echo "USE=\"bindist\"" >> "${clst_make_conf}"
                fi
-
        fi
 
        # We need to merge our package manager with USE="build" set in case it 
is
@@ -240,6 +240,7 @@ cleanup_stages() {
        esac
 
        # Remove bindist from use
+       # this is handled independantly in stage2, changes here should be 
mirrored there
        sed -i "/USE=\"\${USE} bindist\"/d" "${clst_make_conf}"
        sed -i "/USE=\"bindist\"/d" "${clst_make_conf}"
 

Reply via email to