From df066d6ee09c7e41e6170507ad4aad5e01b55c18 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Wed, 17 Jul 2013 15:23:02 -0400 Subject: [PATCH] fix(profiles): Add sysroot-wrappers to PATH We need to add sysroot-wrappers to PATH in portage itself because commands like "sudo emerge ..." reset PATH to a fairly bland default. emerge has similar logic for ccache and distcc internally. --- .../third_party/coreos-overlay/profiles/base/profile.bashrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/base/profile.bashrc b/sdk_container/src/third_party/coreos-overlay/profiles/base/profile.bashrc index f191a5c952..831c1cbf99 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/base/profile.bashrc +++ b/sdk_container/src/third_party/coreos-overlay/profiles/base/profile.bashrc @@ -112,3 +112,9 @@ cros_pre_src_unpack_python_multilib_setup() { cros_pre_pkg_setup_sysroot_build_bin_dir() { PATH+=":${CROS_BUILD_BOARD_BIN}" } + +# Insert our sysroot wrappers into the path +SYSROOT_WRAPPERS_BIN="/usr/lib/sysroot-wrappers/bin" +if [[ "$PATH" != *"$SYSROOT_WRAPPERS_BIN"* ]]; then + export PATH="$SYSROOT_WRAPPERS_BIN:$PATH" +fi