From 85dd14021748b8887768a4837784e39471b13e45 Mon Sep 17 00:00:00 2001 From: David James Date: Thu, 7 Jun 2012 14:55:46 -0700 Subject: [PATCH] Rebuild host workon packages if they are changed. Previously, if you were working on a cros_workon package on the host, it would only get updated once -- after that, the package would never build again. With this change, we now rebuild host workon packages any time their timestamp is modified. This replicates the same feature that we already have for board packages. BUG=chromium-os:12771 TEST=Verify that host workon packages are rebuilt when the timestamps change, and only when the timestamps change. Change-Id: I31ef1d83dc591161a7cb55c4af806ee4a4212cdd Reviewed-on: https://gerrit.chromium.org/gerrit/24782 Reviewed-by: Mike Frysinger Commit-Ready: David James Tested-by: David James --- update_chroot | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/update_chroot b/update_chroot index 6525da8191..3b7879ca40 100755 --- a/update_chroot +++ b/update_chroot @@ -76,8 +76,9 @@ fi # Perform an update of hard-host-depends and world in the chroot. EMERGE_CMD="emerge" +CHROMITE_BIN="${GCLIENT_ROOT}/chromite/bin" if [ "${FLAGS_fast}" -eq "${FLAGS_TRUE}" ]; then - EMERGE_CMD="${GCLIENT_ROOT}/chromite/bin/parallel_emerge" + EMERGE_CMD="${CHROMITE_BIN}/parallel_emerge" fi # In first pass, update portage and toolchains. Lagged updates of both @@ -95,6 +96,11 @@ if [ "${FLAGS_skip_toolchain_update}" -eq "${FLAGS_FALSE}" ]; then sudo $(type -p cros_setup_toolchains) ${TOOLCHAIN_FLAGS} fi +# Build cros_workon packages when they are changed. +for pkg in $("${CHROMITE_BIN}/cros_list_modified_packages" --host); do + EMERGE_FLAGS+=" --reinstall-atoms=${pkg} --usepkg-exclude=${pkg}" +done + # Second pass, update everything else. EMERGE_FLAGS+=" --deep" sudo -E ${EMERGE_CMD} ${EMERGE_FLAGS} \