Skip to contentSkip to conversation

When building from a tarball release use hardcoded path to linux-2.6.18-xen.hg

PATCH Ian Campbell 1 participant 1 message Jun 9, 2008

lore
Share & tools
lore
#0 lore raw

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.

# HG changeset patch
# User Ian Campbell <[email protected]>
# Date 1213002697 -3600
# Node ID 80748262c918ed54298fe609e8eedeb67f95c15d
# Parent b60cf40fae135a38688892efee522d470abdf95b
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.

buildconfigs/select-repository +32 -25
diff -r b60cf40fae13 -r 80748262c918 buildconfigs/select-repository
@@ -32,31 +32,38 @@ if [ X"${LINUX_SRC_PATH}" != X ] ; then
     IFS="$IFS_saved"
 fi
 
-XEN=$(hg -R ${XEN_ROOT} path default)
-if [ $? -ne 0 ] || [ X"$XEN" = "X" ] ; then
-    echo "$ME: Unable to determine Xen repository parent." 1>&2
-    exit 1;
+if [ -d ${XEN_ROOT}/.hgxxx ] ; then
+    XEN=$(hg -R ${XEN_ROOT} path default)
+    if [ $? -ne 0 ] || [ X"$XEN" = "X" ] ; then
+	echo "$ME: Unable to determine Xen repository parent." 1>&2
+	exit 1;
+    fi
+
+    BASE=$(dirname ${XEN})
+    if [ $? -ne 0 ] || [ X"$BASE" = "X" ] ; then
+	echo "$ME: Unable to determine Xen repository base." 1>&2
+	exit 1;
+    fi
+    if [ -d "$XEN" ] && [ ! -d "$BASE/$REPO" ] ; then
+	echo "$ME: No such dir: $BASE/$REPO" 1>&2
+	exit 1
+    fi
+
+    echo "$ME: Found ${BASE}/${REPO}" 1>&2
+
+    # 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
+else
+    echo "Unable to determine path to Linux source tree." 1>&2
+    echo "Falling back to linux-2.6.18-xen Mercurial repository." 1>&2
+    echo http://xenbits.xensource.com/linux-2.6.18-xen.hg
 fi
 
-BASE=$(dirname ${XEN})
-if [ $? -ne 0 ] || [ X"$BASE" = "X" ] ; then
-    echo "$ME: Unable to determine Xen repository base." 1>&2
-    exit 1;
-fi
-if [ -d "$XEN" ] && [ ! -d "$BASE/$REPO" ] ; then
-    echo "$ME: No such dir: $BASE/$REPO" 1>&2
-    exit 1
-fi
-
-echo "$ME: Found ${BASE}/${REPO}" 1>&2
-
-# 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

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel