ia64/xen-unstable

changeset 15273:23460646912e

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>
author Ian Campbell <ian.campbell@xensource.com>
date Tue Jun 05 08:57:53 2007 +0100 (2007-06-05)
parents 7a16a499152c
children f45c84dd5f41
files buildconfigs/select-repository buildconfigs/src.hg-clone
line diff
     1.1 --- a/buildconfigs/select-repository	Mon Jun 04 17:09:12 2007 +0100
     1.2 +++ b/buildconfigs/select-repository	Tue Jun 05 08:57:53 2007 +0100
     1.3 @@ -45,5 +45,14 @@ if [ $? -ne 0 ] || [ X"$XEN" = "X" ] ; t
     1.4  fi
     1.5  
     1.6  echo "$ME: Found ${BASE}/${REPO}" 1>&2
     1.7 -echo ${BASE}/${REPO}
     1.8 +
     1.9 +# If ${BASE}/${REPO} is a local directory then prepend file:// so that
    1.10 +# the test in src.hg-clone will fail and we will clone instead of
    1.11 +# linking this repository. We only want to link repositories which
    1.12 +# were found via LINUX_SRC_PATH.
    1.13 +if [ -d "${BASE}/${REPO}" ] ; then
    1.14 +    echo "file://${BASE}/${REPO}"
    1.15 +else
    1.16 +    echo ${BASE}/${REPO}
    1.17 +fi
    1.18  exit 0
     2.1 --- a/buildconfigs/src.hg-clone	Mon Jun 04 17:09:12 2007 +0100
     2.2 +++ b/buildconfigs/src.hg-clone	Tue Jun 05 08:57:53 2007 +0100
     2.3 @@ -28,7 +28,7 @@ XEN_LINUX_HGREV  ?= tip
     2.4  	        ln -s $${__repo} $(LINUX_SRCDIR) ; \
     2.5  	    else \
     2.6  	        echo "Cloning $${__repo} to $(LINUX_SRCDIR)." ; \
     2.7 -	        $(HG) clone $${__repo} $(LINUX_SRCDIR) ; \
     2.8 +	        $(HG) clone $${__repo#file://} $(LINUX_SRCDIR) ; \
     2.9  	    fi ; \
    2.10  	else \
    2.11  	    __parent=$$($(HG) -R $(LINUX_SRCDIR) path default) ; \