diff --git a/bin/cros_image_to_target.py b/bin/cros_image_to_target.py index 92dadb72cb..29c4057532 100755 --- a/bin/cros_image_to_target.py +++ b/bin/cros_image_to_target.py @@ -669,7 +669,7 @@ def main(argv): # try to build it if we can cros_env.Info('Creating test image') test_output = cros_env.cmd.Output( - cros_env.CrosUtilsPath('enter_chroot.sh'), + 'cros_sdk', '--', './mod_image_for_test.sh', '--board=%s' % options.board, '-y') if not os.path.exists(image_file): diff --git a/common.sh b/common.sh index ca03d2e3d4..63d9bc30ca 100644 --- a/common.sh +++ b/common.sh @@ -268,8 +268,7 @@ function restart_in_chroot_if_needed { if [ $INSIDE_CHROOT -ne 1 ]; then # Get inside_chroot path for script. local chroot_path="$(reinterpret_path_for_chroot "$0")" - exec $SCRIPTS_DIR/enter_chroot.sh -- \ - "$chroot_path" "$@" + exec $GCLIENT_ROOT/chromite/bin/cros_sdk -- "$chroot_path" "$@" fi } @@ -278,7 +277,7 @@ function restart_in_chroot_if_needed { function assert_inside_chroot { if [ $INSIDE_CHROOT -ne 1 ]; then echo "This script must be run inside the chroot. Run this first:" - echo " $SCRIPTS_DIR/enter_chroot.sh" + echo " cros_sdk" exit 1 fi } diff --git a/lib/cros_build_lib.py b/lib/cros_build_lib.py index 68de31db31..063576ad92 100644 --- a/lib/cros_build_lib.py +++ b/lib/cros_build_lib.py @@ -76,7 +76,7 @@ def RunCommand(cmd, print_cmd=True, error_ok=False, error_message=None, if combine_stdout_stderr: stderr = subprocess.STDOUT if input: stdin = subprocess.PIPE - if enter_chroot: cmd = ['./enter_chroot.sh', '--'] + cmd + if enter_chroot: cmd = ['cros_sdk', '--'] + cmd # Print out the command before running. cmd_string = 'PROGRAM(%s) -> RunCommand: %r in dir %s' % (GetCallerName(), @@ -155,7 +155,7 @@ def RunCommandCaptureOutput(cmd, print_cmd=True, cwd=None, input=None, if input: stdin = subprocess.PIPE if combine_stdout_stderr: stderr = subprocess.STDOUT - if enter_chroot: cmd = ['./enter_chroot.sh', '--'] + cmd + if enter_chroot: cmd = ['cros_sdk', '--'] + cmd # Print out the command before running. if print_cmd: diff --git a/serve_factory_packages.py b/serve_factory_packages.py index 723386780e..158ccec6a6 100644 --- a/serve_factory_packages.py +++ b/serve_factory_packages.py @@ -8,9 +8,9 @@ This script runs inside chroot environment. It signs and build factory packages. Then serves them using devserver. All paths should be specified relative to the chroot environment. -E.g.: ./enter_chroot.sh -- serve_factory_packages.py --board +E.g.: cros_sdk -- serve_factory_packages.py --board -Always precede the call to the script with './enter_chroot.sh -- ". +Always precede the call to the script with 'cros_sdk -- ". """ import gflags