From 5fc3fcf15e13b14b0b221ba04f66a6e91bc59637 Mon Sep 17 00:00:00 2001 From: "derat@google.com" Date: Mon, 23 Nov 2009 16:33:38 +0000 Subject: [PATCH] build: Make make_chroot and make_local_repo fail when run as root. Still seeing some bugs get filed related to this. I went through all of the scripts, but let me know if I missed any. Review URL: http://codereview.chromium.org/432002 git-svn-id: svn://chrome-svn/chromeos/trunk@306 06c00378-0e64-4dae-be16-12b19f9950a1 --- make_chroot.sh | 3 ++- make_local_repo.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/make_chroot.sh b/make_chroot.sh index 54e8fa9fa1..63a5ad0240 100755 --- a/make_chroot.sh +++ b/make_chroot.sh @@ -17,8 +17,9 @@ # The path to common.sh should be relative to your script's location. . "$(dirname "$0")/common.sh" -# Script must be run outside the chroot +# Script must be run outside the chroot and as a regular user. assert_outside_chroot +assert_not_root_user DEFAULT_PKGLIST="$SRC_ROOT/package_repo/package-list-dev.txt" diff --git a/make_local_repo.sh b/make_local_repo.sh index 7392916253..11e28bba3a 100755 --- a/make_local_repo.sh +++ b/make_local_repo.sh @@ -8,8 +8,9 @@ # The path to common.sh should be relative to your script's location. . "$(dirname "$0")/common.sh" -# Script must be run outside the chroot +# Script must be run outside the chroot and as a regular user. assert_outside_chroot +assert_not_root_user DEFAULT_DEST="$GCLIENT_ROOT/repo" DEFAULT_DEV_PKGLIST="$SRC_ROOT/package_repo/repo_list_dev.txt"