From aa58465a3f1caab86c69658b58ed38914592ddfc Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 26 Jun 2012 11:52:15 -0400 Subject: [PATCH] update hooks: add feedback messages to slow chrome cleanup Some people think this upgrade hook gets stuck when in reality, it has to delete a lot of files (gigs worth). Add some progress messages so people know it's doing something. BUG=chromium-os:32052 TEST=manually running 25_suppress_incremental_build_across_chroot showed pretty messages Change-Id: Ie20980fb2c60c980b617e98d68b0e5f9633fbb2a Reviewed-on: https://gerrit.chromium.org/gerrit/26111 Reviewed-by: Brian Harring Tested-by: Mike Frysinger Commit-Ready: Mike Frysinger --- .../25_suppress_incremental_build_across_chroot | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/chroot_version_hooks.d/25_suppress_incremental_build_across_chroot b/chroot_version_hooks.d/25_suppress_incremental_build_across_chroot index b2e1484afc..ecba4865d9 100644 --- a/chroot_version_hooks.d/25_suppress_incremental_build_across_chroot +++ b/chroot_version_hooks.d/25_suppress_incremental_build_across_chroot @@ -10,13 +10,15 @@ # pulls the content out to the new location within the chroot. upgrade_path() { - local src="/var/cache/distfiles/target/$1" - local dest="/var/cache/chromeos-chrome/$1" + local src="/var/cache/distfiles/target/$2" + local dest="/var/cache/chromeos-chrome/$2" + info "[$1/4] Checking $src vs $dest" if [ -d "$src" ]; then if [ -d "$dest" ]; then # User has already built it- thus wipe the src and use what's in # the chrome specific cache. + info "[$1/4] Cleaning $src; this could take a while" sudo rm -rf "$src" else sudo mv "$src" "$dest" @@ -27,9 +29,9 @@ upgrade_path() { sudo mkdir -p 0775 /var/cache/chromeos-chrome/ sudo chown "$USER:portage" /var/cache/chromeos-chrome/ -upgrade_path chrome-src -upgrade_path chrome-src-internal -upgrade_path chrome-src-custom -upgrade_path chrome-src-custom-internal +upgrade_path 1 chrome-src +upgrade_path 2 chrome-src-internal +upgrade_path 3 chrome-src-custom +upgrade_path 4 chrome-src-custom-internal exit 0