aboutsummaryrefslogtreecommitdiffstats
path: root/buildconfigs/select-repository
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@xensource.com>2007-06-05 08:57:53 +0100
committerIan Campbell <ian.campbell@xensource.com>2007-06-05 08:57:53 +0100
commitfbc9cef80bf95ab3e0197affed5b30215bef353a (patch)
tree02ba4292dc6344d313dad095e6af5b10a76a67c9 /buildconfigs/select-repository
parentd1895441b3bad78953fda5481c23d711cdbaee84 (diff)
downloadxen-fbc9cef80bf95ab3e0197affed5b30215bef353a.tar.gz
xen-fbc9cef80bf95ab3e0197affed5b30215bef353a.tar.bz2
xen-fbc9cef80bf95ab3e0197affed5b30215bef353a.zip
BUILD: Clone the Linux tree if it wasn't found via $(LINUX_SRC_PATH)
even if it happens to be a local directory. If we located the Linux tree by deriving the path from "hg path default" and it is a local path then prepend "file://" to prevent us trying to symlink it. Unfortunately mercurial doesn't understand file:// URLs so we have to strip it off again before calling hg clone. Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Diffstat (limited to 'buildconfigs/select-repository')
-rwxr-xr-xbuildconfigs/select-repository11
1 files changed, 10 insertions, 1 deletions
diff --git a/buildconfigs/select-repository b/buildconfigs/select-repository
index db46049adb..ef1df59ac3 100755
--- a/buildconfigs/select-repository
+++ b/buildconfigs/select-repository
@@ -45,5 +45,14 @@ if [ $? -ne 0 ] || [ X"$XEN" = "X" ] ; then
fi
echo "$ME: Found ${BASE}/${REPO}" 1>&2
-echo ${BASE}/${REPO}
+
+# If ${BASE}/${REPO} is a local directory then prepend file:// so that
+# the test in src.hg-clone will fail and we will clone instead of
+# linking this repository. We only want to link repositories which
+# were found via LINUX_SRC_PATH.
+if [ -d "${BASE}/${REPO}" ] ; then
+ echo "file://${BASE}/${REPO}"
+else
+ echo ${BASE}/${REPO}
+fi
exit 0