ia64/xen-unstable

changeset 19799:dc0d1200e3f3

buildconfigs/src.git-clone: use git clone, avoid git remote

git 1.4.x (which is on even some moderately recent systems) doesn't
have the `git remote' command. This is what caused the most recent
patchman build failure.

The machinery in buildconfigs/src.git-clone was rather more
complicated than needed, too. In this patch I replace this with a
similar set of runes to those used for ioemu-remote (almost identical
except that the QEMU_TAG feature is not supported in this instance).

I have done a successful test build with this change.

Cc: Ian Campbell <Ian.Campbell@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jun 18 15:32:48 2009 +0100 (2009-06-18)
parents af06333d4c5d
children 78962f85c562
files buildconfigs/mk.linux-2.6-pvops buildconfigs/mk.linux-2.6-tip-latest buildconfigs/src.git-clone
line diff
     1.1 --- a/buildconfigs/mk.linux-2.6-pvops	Thu Jun 18 10:46:21 2009 +0100
     1.2 +++ b/buildconfigs/mk.linux-2.6-pvops	Thu Jun 18 15:32:48 2009 +0100
     1.3 @@ -6,7 +6,6 @@ IMAGE_TARGET ?= bzImage
     1.4  XEN_LINUX_CONFIG_UPDATE := buildconfigs/enable-xen-config
     1.5  
     1.6  XEN_LINUX_GIT_URL ?= git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git
     1.7 -XEN_LINUX_GIT_REMOTENAME ?= xen
     1.8  XEN_LINUX_GIT_REMOTEBRANCH ?= xen-tip/master
     1.9  
    1.10  EXTRAVERSION ?=
     2.1 --- a/buildconfigs/mk.linux-2.6-tip-latest	Thu Jun 18 10:46:21 2009 +0100
     2.2 +++ b/buildconfigs/mk.linux-2.6-tip-latest	Thu Jun 18 15:32:48 2009 +0100
     2.3 @@ -6,7 +6,6 @@ IMAGE_TARGET ?= bzImage vmlinux
     2.4  XEN_LINUX_CONFIG_UPDATE := buildconfigs/enable-xen-config
     2.5  
     2.6  XEN_LINUX_GIT_URL ?= git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip.git
     2.7 -XEN_LINUX_GIT_REMOTENAME ?= x86
     2.8  XEN_LINUX_GIT_REMOTEBRANCH ?= auto-latest
     2.9  
    2.10  EXTRAVERSION ?=
     3.1 --- a/buildconfigs/src.git-clone	Thu Jun 18 10:46:21 2009 +0100
     3.2 +++ b/buildconfigs/src.git-clone	Thu Jun 18 15:32:48 2009 +0100
     3.3 @@ -8,9 +8,6 @@ ifeq ($(XEN_LINUX_GIT_URL),)
     3.4  .ERROR: XEN_LINUX_GIT_URL not specified
     3.5  endif
     3.6  
     3.7 -# The name to use for the remote repository
     3.8 -XEN_LINUX_GIT_REMOTENAME ?= origin
     3.9 -
    3.10  # The branch in the remote repository
    3.11  ifeq ($(XEN_LINUX_GIT_REMOTEBRANCH),)
    3.12  .ERROR: XEN_LINUX_GIT_REMOTEBRANCH not specified
    3.13 @@ -22,39 +19,13 @@ XEN_LINUX_GIT_LOCALBRANCH ?= master
    3.14  XEN_LINUX_GITREV  ?= 
    3.15  
    3.16  $(LINUX_SRCDIR)/.valid-src: $(__XEN_LINUX_UPDATE)
    3.17 -	@set -e ; if [ -d $(LINUX_SRCDIR) ] && [ ! -d $(GIT_DIR) ] ; then \
    3.18 -	    echo "$(LINUX_SRCDIR) exists but is not a git repository." 1>&2 ; \
    3.19 -	    false ; \
    3.20 -	fi
    3.21 -
    3.22 -	@set -e ; if [ ! -e $(LINUX_SRCDIR)/.git ] ; then \
    3.23 -	    mkdir $(LINUX_SRCDIR) ; \
    3.24 -	    cd $(LINUX_SRCDIR) ; \
    3.25 -	    $(GIT) init-db ; \
    3.26 -	fi
    3.27 -
    3.28 -	@set -e ; cd $(LINUX_SRCDIR) ; \
    3.29 -	if ! $(GIT) remote | grep -q $(XEN_LINUX_GIT_REMOTENAME) ; then \
    3.30 -	    echo "Adding remote git repository \`$(XEN_LINUX_GIT_URL)' as \`$(XEN_LINUX_GIT_REMOTENAME)'" ; \
    3.31 -	    $(GIT) remote add $(XEN_LINUX_GIT_REMOTENAME) $(XEN_LINUX_GIT_URL) ; \
    3.32 +	set -ex; \
    3.33 +	if ! [ -d $(LINUX_SRCDIR) ]; then \
    3.34 +		rm -rf $(LINUX_SRCDIR) $(LINUX_SRCDIR).tmp; \
    3.35 +		mkdir $(LINUX_SRCDIR).tmp; rmdir $(LINUX_SRCDIR).tmp; \
    3.36 +		$(GIT) clone $(XEN_LINUX_GIT_URL) $(LINUX_SRCDIR).tmp; \
    3.37 +		cd $(LINUX_SRCDIR).tmp; \
    3.38 +		$(GIT) checkout $(XEN_LINUX_GIT_REMOTEBRANCH); \
    3.39 +		cd ..; mv $(LINUX_SRCDIR).tmp $(LINUX_SRCDIR); \
    3.40  	fi
    3.41 -
    3.42 -	@echo "Updating remote \`$(XEN_LINUX_GIT_REMOTENAME)'"
    3.43 -	@cd $(LINUX_SRCDIR) && $(GIT) fetch $(XEN_LINUX_GIT_REMOTENAME)
    3.44 -
    3.45 -	@set -e ; cd $(LINUX_SRCDIR) ; \
    3.46 -	if ! $(GIT) branch -l | grep -q $(XEN_LINUX_GIT_LOCALBRANCH) ; then \
    3.47 -	    $(GIT) branch --track $(XEN_LINUX_GIT_LOCALBRANCH) \
    3.48 -	        $(XEN_LINUX_GIT_REMOTENAME)/$(XEN_LINUX_GIT_REMOTEBRANCH) ; \
    3.49 -	    $(GIT) checkout ; \
    3.50 -	fi
    3.51 -
    3.52 -	@ set -e ; cd $(LINUX_SRCDIR) ; \
    3.53 -	if [ -n "$(XEN_LINUX_GITREV)" ] ; then \
    3.54 -	    echo "Updating $(LINUX_SRCDIR) to revision \'$(XEN_LINUX_GITREV)'." ; \
    3.55 -	    $(GIT) reset --hard $(XEN_LINUX_GITREV) ; \
    3.56 -	else \
    3.57 -	    $(GIT) reset --hard $(XEN_LINUX_GIT_REMOTENAME)/$(XEN_LINUX_GIT_REMOTEBRANCH) ; \
    3.58 -	fi
    3.59 -
    3.60  	touch $@