Add chroot version 2 upgrade script

Add script that adds depot_tools and chromite/bin to the PATH globally using /etc/env.d

BUG=16093
TEST=Ran make_chroot and run_chroot_version_hooks

Change-Id: I6011d7436f18ce46dfe215f01068e862d2567273
Reviewed-on: http://gerrit.chromium.org/gerrit/2022
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Ryan Cui <rcui@chromium.org>
This commit is contained in:
Ryan Cui 2011-06-02 19:58:32 -07:00 committed by Ryan Cui
parent 06165e0880
commit 780933db56

View File

@ -0,0 +1,15 @@
# Copyright (c) 2011 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.
target="/etc/env.d/99chromiumos"
sudo_clobber "${target}" <<EOF
PATH=/home/$USER/trunk/chromite/bin:/home/$USER/depot_tools
CROS_WORKON_SRCROOT=/home/$USER/trunk
PORTAGE_USERNAME=$USER
EOF
sudo env-update
info "Chroot upgraded to version 2: PATH is updated globally"
exit 0