From 828a4e17104303976b68add8e1e76ac557390aa1 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Sun, 14 Jul 2013 13:03:15 -0400 Subject: [PATCH] cleanup(catalyst): Updates for catalystrc Remove the catalystrc code that updated /etc/locale.gen, it wasn't generally effective since catalyst installs things without CONFIG_PROTECT and therefore locale.gen always got overwritten just before it was going to be used. Add --load-average to MAKEOPTS so builds better manage their parallelism when multiple independent jobs are compiling code. Disable some locking to speed up builds that use lots of binary packages. --- lib/catalyst.sh | 8 +++----- lib/catalystrc | 21 --------------------- 2 files changed, 3 insertions(+), 26 deletions(-) delete mode 100644 lib/catalystrc diff --git a/lib/catalyst.sh b/lib/catalyst.sh index 334b39410c..7b514bd745 100644 --- a/lib/catalyst.sh +++ b/lib/catalyst.sh @@ -41,8 +41,6 @@ DEFINE_string profile "${DEFAULT_PROFILE}" \ "Portage profile, may be prefixed with repo:" DEFINE_boolean rebuild ${FLAGS_FALSE} \ "Rebuild and overwrite stages that already exist." -DEFINE_integer make_jobs ${NUM_JOBS} "Tune make's concurrency." -DEFINE_integer emerge_jobs ${NUM_JOBS} "Tune emerge's concurrency." DEFINE_boolean debug ${FLAGS_FALSE} "Enable verbose output from catalyst." ##################### @@ -73,9 +71,9 @@ EOF } catalystrc() { -cat "${SCRIPTS_DIR}/lib/catalystrc" -echo "export MAKEOPTS=-j$FLAGS_make_jobs" -echo "export EMERGE_DEFAULT_OPTS=--jobs=$FLAGS_emerge_jobs" +echo "export MAKEOPTS='--jobs=${NUM_JOBS} --load-average=${NUM_JOBS}'" +echo "export EMERGE_DEFAULT_OPTS=--jobs=${NUM_JOBS}" +echo "export FEATURES='parallel-install -ebuild-locks'" } # Common values for all stage spec files diff --git a/lib/catalystrc b/lib/catalystrc deleted file mode 100644 index 06f12c11cd..0000000000 --- a/lib/catalystrc +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -# setup some configs catalyst doesn't handle -# i.e: update locale.gen to speed up builds -maybe_append() { - [[ -f "$1" && ! -w "$1" ]] && return - if ! grep -q "^$2" "$1"; then - echo "$2" >> "$1" - fi -} - -fixup_rootfs() { - mkdir -p "$1/etc" 2>/dev/null || return - maybe_append "$1/etc/locale.gen" "en_US ISO-8859-1" - maybe_append "$1/etc/locale.gen" "en_US.UTF-8 UTF-8" -} - -# Fix both / and $ROOT (if it exists) -fixup_rootfs -[[ "${ROOT:-/}" != / ]] && fixup_rootfs "$ROOT" -unset fixup_rootfs maybe_append