aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2016-09-18 20:26:30 -0700
committerBrian Dolbec <dolsen@gentoo.org>2016-09-18 20:26:30 -0700
commit28228aff898a97241568b5de9613a51a52712d99 (patch)
tree6f2edbca3d1793563d6d799109cde4c72511a712
parentstage1-controller.sh was *not running in chroot*, move it's functions into th... (diff)
downloadcatalyst-28228aff898a97241568b5de9613a51a52712d99.tar.gz
catalyst-28228aff898a97241568b5de9613a51a52712d99.tar.bz2
catalyst-28228aff898a97241568b5de9613a51a52712d99.zip
targets/support/chroot-functions.sh: Fix CHROOT partial breakage
Since commit: d05808a7a8313a66a0be67e89867b4c3a1fe5ca0 Author: Rick Farina (Zero_Chaos) <zerochaos@gentoo.org> (Wed 09 Sep 2015 09:32:27 AM PDT) Subject: only set CHOST in make.conf if we are setting it via catalyst to override the profile CHOST has not been consistently set via the arch/*.py files. As a consequence, there has been some silent breakage causing intermittent issues as clst_CHOST was not always present. Another recent commit 5b3a6639649e2 also changes clst_CHOST to just CHOST, but my testing revealed that this too was unset whne it was used in the set_gcc, set_binutils functions. The CHOST setting code in set_myfeatures was not run until after the gcc and binutils settings have been done. These changes reverts commit 5b3a6639649e2 CHOST change and restores a consistently set clst_CHOST. This seetting will rely on the profile setting unless overriden by spec file or arch.*.py settings for various subarches.
-rwxr-xr-xtargets/support/chroot-functions.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index ed8da84f..2f794928 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -17,6 +17,18 @@ trap "echo SIGKILL signal recieved killing $0 with pid $$;kill -9 $$" SIGKILL
# * kernel recognizes this and generates SIGINT signal
trap "echo SIGINT signal recieved killing $0 with pid $$;kill -9 $$" SIGINT
+# test if CHOST was set on the python side
+if [[ -z "${clst_CHOST}" ]] ; then
+ # No, it wasn't
+ if [[ -z "${clst_chost}" ]] ; then
+ # No override was set, so grab CHOST from the profile
+ export clst_CHOST=$(portageq envvar CHOST)
+ else
+ # Set CHOST from the spec override
+ export clst_CHOST="${clst_chost}"
+ fi
+fi
+
check_genkernel_version() {
local version parts=() major minor
@@ -146,7 +158,7 @@ setup_myemergeopts(){
setup_binutils(){
if [ -x /usr/bin/binutils-config ]
then
- my_binutils=$( cd /etc/env.d/binutils; ls ${CHOST}-* | head -n 1 )
+ my_binutils=$( cd /etc/env.d/binutils; ls ${clst_CHOST}-* | head -n 1 )
if [ -z "${my_binutils}" ]
then
my_binutils=1
@@ -158,7 +170,7 @@ setup_binutils(){
setup_gcc(){
if [ -x /usr/bin/gcc-config ]
then
- my_gcc=$( cd /etc/env.d/gcc; ls ${CHOST}-* | head -n 1 )
+ my_gcc=$( cd /etc/env.d/gcc; ls ${clst_CHOST}-* | head -n 1 )
if [ -z "${my_gcc}" ]
then
my_gcc=1