From 99ed29d218d565420f545187b6f4f2a9ac3e8beb Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Thu, 12 Jun 2014 15:30:24 -0700 Subject: [PATCH 1/2] fix(board_setup): Remove old make.conf symlinks Just use the single auto-generated make.conf, it covers everything now. --- build_library/board_options.sh | 2 +- setup_board | 32 ++++++++++++++------------------ 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/build_library/board_options.sh b/build_library/board_options.sh index 5a75022048..c5eb928289 100644 --- a/build_library/board_options.sh +++ b/build_library/board_options.sh @@ -12,4 +12,4 @@ BOARD_ROOT="/build/${BOARD}" ARCH=$(get_board_arch ${BOARD}) # What cross-build are we targeting? -. "${BOARD_ROOT}/etc/make.conf.board_setup" +. "${BOARD_ROOT}/etc/portage/make.conf" diff --git a/setup_board b/setup_board index 00d16b213c..7459f766e1 100755 --- a/setup_board +++ b/setup_board @@ -187,7 +187,6 @@ esac COREOS_CONFIG="/usr/local/portage/coreos/coreos/config" BOARD_ROOT="/build/${BOARD_VARIANT}" BOARD_ETC="${BOARD_ROOT}/etc" -BOARD_SETUP="${BOARD_ETC}/make.conf.board_setup" BOARD_PROFILE="${BOARD_ETC}/portage/profile" BOARD_ARCH=$(get_board_arch "$BOARD") BOARD_CHOST=$(get_board_chost ${BOARD}) @@ -232,25 +231,19 @@ if [[ ! -L "${BOARD_ROOT}/packages" ]]; then fi info "Configuring portage in ${BOARD_ROOT}" -cmds=( - "mkdir -p '${BOARD_ROOT}' '${BOARD_PROFILE}'" - "ROOT='${BOARD_ROOT}' eselect profile set --force '${PORTAGE_PROFILE}'" -) +sudo mkdir -p "${BOARD_PROFILE}" +sudo ROOT="${BOARD_ROOT}" eselect profile set --force "${PORTAGE_PROFILE}" -# Setup the make.confs. We use the following: -# make.conf <- Overall target make.conf [arm, x86, etc. version] -# make.conf.board_setup <- Declares CHOST, ROOT, etc. -# make.conf.common <- Common settings across all targets -cmds+=( - "ln -sf '${COREOS_CONFIG}/make.conf.${BOARD_ARCH}-target' \ - '${BOARD_ETC}/make.conf'" - "ln -sf '${COREOS_CONFIG}/make.conf.common-target' \ - '${BOARD_ETC}/make.conf.common'" - "touch '${BOARD_ROOT}/etc/make.conf.user'" -) -sudo_multi "${cmds[@]}" +# Cleanup/migrate from older make.conf files +sudo rm -f "${BOARD_ETC}/make.conf" "${BOARD_ETC}/make.conf.common" +if [[ -f "${BOARD_ETC}/make.conf.user" ]]; then + sudo mv "${BOARD_ETC}/make.conf.user" \ + "${BOARD_ETC}/portage/make.conf.user" +else + sudo touch "${BOARD_ETC}/portage/make.conf.user" +fi -sudo_clobber "${BOARD_SETUP}" < Date: Thu, 12 Jun 2014 15:34:52 -0700 Subject: [PATCH 2/2] fix(update_chroot): Remove old make.conf symlinks The old static files are pretty much empty and unused now. --- update_chroot | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/update_chroot b/update_chroot index 2b57b36a4c..add4b3dbd8 100755 --- a/update_chroot +++ b/update_chroot @@ -54,10 +54,10 @@ COREOS_CONFIG="${COREOS_OVERLAY}/coreos/config" info "Setting up portage..." sudo mkdir -p "/etc/portage/repos.conf/" -sudo ln -sf "${COREOS_CONFIG}/make.conf.amd64-host" "/etc/portage/make.conf" +sudo rm -f "/etc/portage/make.conf" sudo touch "/etc/portage/make.conf.user" -sudo_clobber "/etc/portage/make.conf.host_setup" <