Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Issue 6265028: Fix common.sh to work in it's new location at /usr/lib/crosutils. (Closed)

Created:
9 years, 11 months ago by robotboy
Modified:
9 years, 7 months ago
Reviewers:
davidjames, anush
CC:
chromium-os-reviews_chromium.org, Mandeep Singh Baines, anush, sosa
Visibility:
Public.

Description

Fix common.sh to work in it's new location at /usr/lib/crosutils. If we are inside the chroot then we assume that the "gclient" root is ~/trunk. If we are outside the chroot we continue with the previous search mechanism to find the "gclient" root. Change-Id: Ia40de609ea596228fec2644ff3046e376b112b06 BUG=chromium-os:4230 TEST=run "src/scripts/cros_overlay_list --board tegra2 --variant seaboard" inside and outside the chroot. Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=856799a

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -8 lines) Patch
M common.sh View 2 chunks +13 lines, -8 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
robotboy
9 years, 11 months ago (2011-01-26 18:44:08 UTC) #1
anush
9 years, 11 months ago (2011-01-26 18:48:11 UTC) #2
LGTM. Thanks for the fix.  +gspencer since he is helping update other
scripts in src/scripts.

On Wed, Jan 26, 2011 at 10:44 AM, <robotboy@chromium.org> wrote:

> Reviewers: anush, davidjames,
>
> Description:
> Fix common.sh to work in it's new location at /usr/lib/crosutils.
>
> If we are inside the chroot then we assume that the "gclient" root
> is ~/trunk.  If we are outside the chroot we continue with the
> previous search mechanism to find the "gclient" root.
>
> Change-Id: Ia40de609ea596228fec2644ff3046e376b112b06
>
> BUG=chromium-os:4230
> TEST=run "src/scripts/cros_overlay_list --board tegra2 --variant seaboard"
> inside and outside the chroot.
>
> Please review this at http://codereview.chromium.org/6265028/
>
> SVN Base: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
>
> Affected files:
>  M common.sh
>
>
> Index: common.sh
> diff --git a/common.sh b/common.sh
> index
>
a4d91384339d8fc61b450229f2149111eea1c3e1..4fe71e4c5b42e02cd9cd6a83f85640e3d7aadb45
> 100644
> --- a/common.sh
> +++ b/common.sh
> @@ -17,11 +17,24 @@ NUM_JOBS=`grep -c "^processor" /proc/cpuinfo`
>  # Store location of the calling script.
>  TOP_SCRIPT_DIR="${TOP_SCRIPT_DIR:-$(dirname $0)}"
>
> +# Detect whether we're inside a chroot or not
> +if [ -e /etc/debian_chroot ]
> +then
> +  INSIDE_CHROOT=1
> +else
> +  INSIDE_CHROOT=0
> +fi
> +
>  # Find root of source tree
>  if [ "x$GCLIENT_ROOT" != "x" ]
>  then
>   # GCLIENT_ROOT already set, so we're done
>   true
> +elif [ $INSIDE_CHROOT -eq 1 ]
> +then
> +  # If we are inside the chroot and we haven't been told otherwise, we
> assume
> +  # that the GCLIENT_ROOT is ~/trunk.
> +  GCLIENT_ROOT="${HOME}/trunk"
>  elif [ "x$COMMON_SH" != "x" ]
>  then
>   # COMMON_SH set, so assume that's us
> @@ -116,14 +129,6 @@ DEFAULT_BOARD=$(echo $ALL_BOARDS | awk '{print $NF}')
>  # Enable --fast by default.
>  DEFAULT_FAST="${FLAGS_TRUE}"
>
> -# Detect whether we're inside a chroot or not
> -if [ -e /etc/debian_chroot ]
> -then
> -  INSIDE_CHROOT=1
> -else
> -  INSIDE_CHROOT=0
> -fi
> -
>  # Directory locations inside the dev chroot
>  CHROOT_TRUNK_DIR="/home/$USER/trunk"
>
>
>
>

Powered by Google App Engine
This is Rietveld 408576698