make_chroot: make bare_chroot more robust

With some distros merging /bin and /sbin and /usr, assuming the $PATH
outside of the chroot contains all the elements we need when we're in
the chroot no longer flies.  Update the bare_chroot helper so that it
always includes all the paths that matter inside the chroot.

BUG=None
TEST=`cros_sdk --chroot asdf` still works

Change-Id: Ieacf2772448b8b3803f60b78412aa5d179e6b49f
Reviewed-on: https://gerrit.chromium.org/gerrit/64336
Reviewed-by: David James <davidjames@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/sdk_lib/make_chroot.sh b/sdk_lib/make_chroot.sh
index 9f1ac23..af1c2ce 100755
--- a/sdk_lib/make_chroot.sh
+++ b/sdk_lib/make_chroot.sh
@@ -110,11 +110,15 @@
     -- "${ENTER_CHROOT_ARGS[@]}" "${early_env[@]}" "$@"
 }
 
-# Run a command within the chroot.  The main usage of this is to avoid
-# the overhead of enter_chroot, and do not need access to the source tree,
-# don't need the actual chroot profile env, and can run the command as root.
+# Run a command within the chroot.  The main usage of this is to avoid the
+# overhead of enter_chroot.  It's when we do not need access to the source
+# tree, don't need the actual chroot profile env, and can run the command as
+# root.  We do have to make sure PATH includes all the right programs as
+# found inside of the chroot since the environment outside of the chroot
+# might be insufficient (like distros with merged /bin /sbin and /usr).
 bare_chroot() {
-  chroot "${FLAGS_chroot}" "$@"
+  PATH=/bin:/sbin:/usr/bin:/usr/sbin:${PATH} \
+    chroot "${FLAGS_chroot}" "$@"
 }
 
 cleanup() {