From 57d19d0f064a21c01226fe41c452eb2b1b7dc0ce Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Tue, 13 May 2014 15:51:38 -0700 Subject: [PATCH] refactor(update_chroot): Write make.conf.host_setup There is no need for this to be in sdk_lib any more, remove what little remains of make_conf_util.sh. --- sdk_lib/make_conf_util.sh | 11 ----------- update_chroot | 22 +++++++--------------- 2 files changed, 7 insertions(+), 26 deletions(-) delete mode 100644 sdk_lib/make_conf_util.sh diff --git a/sdk_lib/make_conf_util.sh b/sdk_lib/make_conf_util.sh deleted file mode 100644 index fe614b1c25..0000000000 --- a/sdk_lib/make_conf_util.sh +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -create_host_setup() { - local host_setup="$2/etc/portage/make.conf.host_setup" - ( echo "# Automatically generated. EDIT THIS AND BE SORRY." - echo "MAKEOPTS='--jobs=${NUM_JOBS} --load-average=${NUM_JOBS}'" - ) | sudo_clobber "$host_setup" - sudo chmod 644 "$host_setup" -} diff --git a/update_chroot b/update_chroot index 764048f068..a42096aa17 100755 --- a/update_chroot +++ b/update_chroot @@ -46,27 +46,19 @@ eval set -- "${FLAGS_ARGV}" switch_to_strict_mode . "${BUILD_LIBRARY_DIR}/toolchain_util.sh" -. "${SCRIPTS_DIR}/sdk_lib/make_conf_util.sh" - -# Create /etc/make.conf.host_setup. The file content is regenerated -# from scratch every update. There are various reasons to do this: -# + It's cheap, so this is an easy way to guarantee correct content -# after an upgrade. -# + Inside make_chroot.sh, we use a temporary version of the file -# which must be updated before the script completes; that final -# update happens here. -# + If the repositories change to add or remove the private -# overlay, the file may need to be regenerated. -create_host_setup PORTAGE_STABLE_OVERLAY="/usr/local/portage/stable" CROSSDEV_OVERLAY="/usr/local/portage/crossdev" CHROOT_OVERLAY="/usr/local/portage/coreos" -# Create repos.conf configs. -info "Setting up repos.conf..." +info "Setting up portage..." sudo mkdir -p "/etc/portage/repos.conf/" -sudo tee "/etc/portage/repos.conf/coreos.conf" > /dev/null <