From d4316fe32f05b2642e8e7f36b3cfaf32690cd25f Mon Sep 17 00:00:00 2001 From: Matt Tennant Date: Tue, 30 Aug 2011 12:06:42 -0700 Subject: [PATCH] When entering chroot, copy ~/.gdata_cred.txt if it exists. The process of updating the Portage package status spreadsheet on buildbots requires a credentials file at ~/.gdata_cred.txt in the chroot. All buildbot VMs have this file outside the chroot now, so this change adds that file to the list of things created in the user's homedir when entering the chroot. BUG=None TEST=Run cros_sdk in these scenarios: ~/.gdata_cred.txt exists -> Same file should be at $HOME in chroot ~/.gdata_cred.txt does not exist -> No file created in chroot Change-Id: I5c0f333a9308f5efa5324ce2e202a7c9e9fdb48b Reviewed-on: http://gerrit.chromium.org/gerrit/6911 Reviewed-by: Zdenek Behan Tested-by: Matt Tennant --- sdk_lib/enter_chroot.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sdk_lib/enter_chroot.sh b/sdk_lib/enter_chroot.sh index e3635e5ed0..8750300e93 100755 --- a/sdk_lib/enter_chroot.sh +++ b/sdk_lib/enter_chroot.sh @@ -307,6 +307,12 @@ function setup_env { user.email "$(cd /tmp; git var GIT_COMMITTER_IDENT | \ sed -e 's/.*<\([^>]*\)>.*/\1/')" || true + # Copy ~/.gdata_cred.txt to chroot if it exists. This file contains + # credentials for reading/writing Google Docs on chromium.org. + if [ -f "$HOME/.gdata_cred.txt" ]; then + cp "$HOME/.gdata_cred.txt" "${FLAGS_chroot}/home/${USER}/.gdata_cred.txt" + fi + # Make sure user's requested locales are available # http://crosbug.com/19139 # And make sure en_US{,.UTF-8} are always available as