Turn on --fast on official builds.

The --fast support for build_packages is stable now, and should significantly
improve the speed of our official builders. We should turn it on so that
builders can finish their builds in less than 8 hours.

BUG=chromium-os:6706
TEST=Run ./enter_chroot.sh --official_build and verify that --fast is on by
     default now

Change-Id: I6ad126b9b6ce16ffc9887a7af22c2e3f85afbf42

Review URL: http://codereview.chromium.org/3418001
This commit is contained in:
David James 2010-11-30 13:22:05 -08:00
parent 63c51c4d3c
commit ff07201a8c
2 changed files with 12 additions and 16 deletions

View File

@ -113,11 +113,8 @@ ALL_BOARDS=$(echo $ALL_BOARDS)
#DEFAULT_BOARD=x86-generic # or...
DEFAULT_BOARD=$(echo $ALL_BOARDS | awk '{print $NF}')
# Enable --fast by default on non-official builds
# Enable --fast by default.
DEFAULT_FAST="${FLAGS_TRUE}"
if [ "${CHROMEOS_OFFICIAL:-0}" = "1" ]; then
DEFAULT_FAST="${FLAGS_FALSE}"
fi
# Detect whether we're inside a chroot or not
if [ -e /etc/debian_chroot ]

View File

@ -310,13 +310,6 @@ class DepGraphGenerator(object):
# will be going away soon as we migrate to CROS_WORKON_SRCROOT.
os.environ.setdefault("CHROMEOS_ROOT", os.environ["HOME"] + "/trunk")
# Modify the environment to disable locking by default.
# TODO(davidjames): This option can cause problems if packages muck
# with each other during the post-install step. There are a few host
# packages that do this, so we only do this environment modification for
# board builds.
os.environ.setdefault("PORTAGE_LOCKS", "false")
# Turn off interactive delays
os.environ["EBEEP_IGNORE"] = "1"
os.environ["EPAUSE_IGNORE"] = "1"
@ -357,11 +350,17 @@ class DepGraphGenerator(object):
# TODO(davidjames): Look for a better solution.
features = os.environ.get("FEATURES", "") + " -collision-protect"
# If we're cross-compiling, updating the environment every time we install
# a package isn't necessary, and leads to race conditions when
# PORTAGE_LOCKS is false. In this case, do environment updates at the end,
# instead.
if self.board and os.environ.get("PORTAGE_LOCKS") == "false":
# If we're installing packages to the board, and we're not using the
# official flag, we can enable the following optimizations:
# 1) Don't lock during install step. This allows multiple packages to be
# installed at once. This is safe because our board packages do not
# muck with each other during the post-install step.
# 2) Don't update the environment until the end of the build. This is
# safe because board packages don't need to run during the build --
# they're cross-compiled, so our CPU architecture doesn't support them
# anyway.
if self.board and os.environ.get("CHROMEOS_OFFICIAL") != "1":
os.environ.setdefault("PORTAGE_LOCKS", "false")
features = features + " no-env-update"
os.environ["FEATURES"] = features