diff --git a/chroot_version_hooks.d/46_64bit_convert_butterfly b/chroot_version_hooks.d/46_64bit_convert_butterfly new file mode 100644 index 0000000000..9125014c82 --- /dev/null +++ b/chroot_version_hooks.d/46_64bit_convert_butterfly @@ -0,0 +1,28 @@ +# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This is meant to happen immediately after we update these boards +# from 64bit to 32bit. It moves the existing build root out of the +# way and re-creates the build root. The user must remove the copy +# of the old build root manually if it is not needed. + +for board in butterfly; do + build="/build/${board}" + if [[ -d ${build} ]] ; then + case ${HOSTNAME:-$(hostname)} in + *.golo.chromium.org) + # Do not keep on buildbots. + sudo rm -rf "${build}" + ;; + *) + info "Moving 64bit ${board} to ${board}.64bit" + info "If you don't need it, please run " + info "sudo rm -rf ${build}.64bit" + sudo mv ${build}{,.64bit} + info "Running setup_board --board=${board}" + ~/trunk/src/scripts/setup_board --board=${board} --skip_chroot_upgrade + ;; + esac + fi +done