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.
This commit is contained in:
Michael Marineau 2013-07-14 13:03:15 -04:00
parent 6b336e17b2
commit 828a4e1710
2 changed files with 3 additions and 26 deletions

View File

@ -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

View File

@ -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