Another CL is coming to automatically add depot_tools to the PATH
inside the chroot. It's in a different repo.
Review URL: http://codereview.chromium.org/605016
If one passes --chrome_root=.../path/to/chrome_root/outside/chroot to
enter_chroot.sh once, enter_chroot will make a note inside the croot
and mount it on all subsequent calls to enter_chroot, even if the
argument is not passed again. If ever enter_chroot can't find the
proper dir, it deletes any stored note.
chrome_root must contain a "src" subdirectory.
Review URL: http://codereview.chromium.org/596102
Change enter_chroot.sh to keep a list of open PIDs (enter_chroot.sh
instances) in chroot/var/lock, and use flock on that file to support
atomic operations to it.
When entering chroot, append the PID to the lock file.
When exiting chroot, clear out current PID and any dead
PIDs/duplicates. If the lock file is empty, only then clean up the
mounts.
Note that I have a little bit of code duplication: the number 200,
which is a manually numbered fd in bash, seemed impossible to place
inside a variable. If you know how to do it, please let me know.
Review URL: http://codereview.chromium.org/584010
Set LANG=C also when providing a command to enter_chroot.sh. Should make
buildbot logs quite a bit shorter.
Review URL: http://codereview.chromium.org/521053