ia64/xen-unstable
changeset 17808:f6520678755a
When building from a tarball release use hardcoded path to
linux-2.6.18-xen.hg as a last resort when searching for a Linux source
tree.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
linux-2.6.18-xen.hg as a last resort when searching for a Linux source
tree.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Mon Jun 09 10:44:09 2008 +0100 (2008-06-09) |
parents | a40c23c25b0d |
children | 6ec700f46c4e |
files | buildconfigs/select-repository |
line diff
1.1 --- a/buildconfigs/select-repository Mon Jun 09 09:51:14 2008 +0100 1.2 +++ b/buildconfigs/select-repository Mon Jun 09 10:44:09 2008 +0100 1.3 @@ -32,31 +32,38 @@ if [ X"${LINUX_SRC_PATH}" != X ] ; then 1.4 IFS="$IFS_saved" 1.5 fi 1.6 1.7 -XEN=$(hg -R ${XEN_ROOT} path default) 1.8 -if [ $? -ne 0 ] || [ X"$XEN" = "X" ] ; then 1.9 - echo "$ME: Unable to determine Xen repository parent." 1>&2 1.10 - exit 1; 1.11 +if [ -d ${XEN_ROOT}/.hgxxx ] ; then 1.12 + XEN=$(hg -R ${XEN_ROOT} path default) 1.13 + if [ $? -ne 0 ] || [ X"$XEN" = "X" ] ; then 1.14 + echo "$ME: Unable to determine Xen repository parent." 1>&2 1.15 + exit 1; 1.16 + fi 1.17 + 1.18 + BASE=$(dirname ${XEN}) 1.19 + if [ $? -ne 0 ] || [ X"$BASE" = "X" ] ; then 1.20 + echo "$ME: Unable to determine Xen repository base." 1>&2 1.21 + exit 1; 1.22 + fi 1.23 + if [ -d "$XEN" ] && [ ! -d "$BASE/$REPO" ] ; then 1.24 + echo "$ME: No such dir: $BASE/$REPO" 1>&2 1.25 + exit 1 1.26 + fi 1.27 + 1.28 + echo "$ME: Found ${BASE}/${REPO}" 1>&2 1.29 + 1.30 + # If ${BASE}/${REPO} is a local directory then prepend file:// so that 1.31 + # the test in src.hg-clone will fail and we will clone instead of 1.32 + # linking this repository. We only want to link repositories which 1.33 + # were found via LINUX_SRC_PATH. 1.34 + if [ -d "${BASE}/${REPO}" ] ; then 1.35 + echo "file://${BASE}/${REPO}" 1.36 + else 1.37 + echo ${BASE}/${REPO} 1.38 + fi 1.39 +else 1.40 + echo "Unable to determine path to Linux source tree." 1>&2 1.41 + echo "Falling back to linux-2.6.18-xen Mercurial repository." 1>&2 1.42 + echo http://xenbits.xensource.com/linux-2.6.18-xen.hg 1.43 fi 1.44 1.45 -BASE=$(dirname ${XEN}) 1.46 -if [ $? -ne 0 ] || [ X"$BASE" = "X" ] ; then 1.47 - echo "$ME: Unable to determine Xen repository base." 1>&2 1.48 - exit 1; 1.49 -fi 1.50 -if [ -d "$XEN" ] && [ ! -d "$BASE/$REPO" ] ; then 1.51 - echo "$ME: No such dir: $BASE/$REPO" 1>&2 1.52 - exit 1 1.53 -fi 1.54 - 1.55 -echo "$ME: Found ${BASE}/${REPO}" 1>&2 1.56 - 1.57 -# If ${BASE}/${REPO} is a local directory then prepend file:// so that 1.58 -# the test in src.hg-clone will fail and we will clone instead of 1.59 -# linking this repository. We only want to link repositories which 1.60 -# were found via LINUX_SRC_PATH. 1.61 -if [ -d "${BASE}/${REPO}" ] ; then 1.62 - echo "file://${BASE}/${REPO}" 1.63 -else 1.64 - echo ${BASE}/${REPO} 1.65 -fi 1.66 exit 0