and "cat" stuff and pipe it to something that can write to a
file as root. For example:
echo "foo" | sudo_append /tmp/bar
will append "foo" to the file /tmp/bar as root. While
echo "foo" | sudo_clobber /tmp/bar
will truncate /tmp/bar and then write "foo" to the file.
Review URL: http://codereview.chromium.org/1610021
This is necessary for two reasons:
1) It's nice to get an error message when mount/unmount fails
2) set -e mode doesn't have any effect when you're in a subshell
Note that these mount/unmount failures do happen regularly in development,
so folks who depended on mount/umount failing silently will no longer be
able to rely on this and will have to kill the mounts manually.
Also fix subtle bugs in regexes for matching mount paths. (E.g. where the
regex for $HOME/chroot also matches $HOME/chroot2).
TEST=Tested mount/unmount with concurrently open shells.
Tested mount/unmount when mount is being used by a process but the
lock file does not reflect this.
BUG=none
Review URL: http://codereview.chromium.org/1211001
Use our karmic mirror for creating the build chroot, removing the need for
make_local_repo.sh and the repo_list_*.txt files. If a local repo exists
when build_chroot.sh is run it will be used, but it's no longer necessary.
This change does not remove make_local_repo.sh or the repo_list_*.txt files.
Review URL: http://codereview.chromium.org/548083
This change switches to mastering an image without using debootstrap.
We turn on the previously experimental bits that install a small
set of packages manually before handing things over to apt. In both
cases we use apt to download the packages so that it can populate
it's local package cache.
With this change we will no longer depend on the local_repo when
mastering an image. Developers will not have to rebuild their
local repo when repo_list_image.txt changes. Instead we will use
and lazy-fill the local apt-cache. The first time you build_image.sh
it will be slow since it needs to download the packages. Subsequent
runs should be as before since it will use the local cache. If
packages are added they should be lazily fetched in the next image
build.
Until we have a fully populated external mirror, developers will
still have to add packages to repo_list_image.txt. Also, until
make_chroot is switched over to use the external repo then
developers will have to redo their local repo when the
repo_list_dev.txt changes.
Review URL: http://codereview.chromium.org/521073