[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] BUILD: Clone the Linux tree if it wasn't found via $(LINUX_SRC_PATH)



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
# Date 1181030273 -3600
# Node ID 23460646912e4ad627b30bc614045ee20a18233a
# Parent  7a16a499152ce67fb36b4e101b7d2d953d1f6362
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@xxxxxxxxxxxxx>
---
 buildconfigs/select-repository |   11 ++++++++++-
 buildconfigs/src.hg-clone      |    2 +-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff -r 7a16a499152c -r 23460646912e buildconfigs/select-repository
--- a/buildconfigs/select-repository    Mon Jun 04 17:09:12 2007 +0100
+++ b/buildconfigs/select-repository    Tue Jun 05 08:57:53 2007 +0100
@@ -45,5 +45,14 @@ fi
 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
diff -r 7a16a499152c -r 23460646912e buildconfigs/src.hg-clone
--- a/buildconfigs/src.hg-clone Mon Jun 04 17:09:12 2007 +0100
+++ b/buildconfigs/src.hg-clone Tue Jun 05 08:57:53 2007 +0100
@@ -28,7 +28,7 @@ XEN_LINUX_HGREV  ?= tip
                ln -s $${__repo} $(LINUX_SRCDIR) ; \
            else \
                echo "Cloning $${__repo} to $(LINUX_SRCDIR)." ; \
-               $(HG) clone $${__repo} $(LINUX_SRCDIR) ; \
+               $(HG) clone $${__repo#file://} $(LINUX_SRCDIR) ; \
            fi ; \
        else \
            __parent=$$($(HG) -R $(LINUX_SRCDIR) path default) ; \

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.