aboutsummaryrefslogtreecommitdiffstats
path: root/buildconfigs
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-06-18 15:32:48 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-06-18 15:32:48 +0100
commite88a10e8c7cbeda42c18859427dae29470174ce1 (patch)
tree1014ddfc872e3e2e39a8d63f0e9a75bc487adc16 /buildconfigs
parentb90fe59f0c6725158f38778f9005c7908a627211 (diff)
downloadxen-e88a10e8c7cbeda42c18859427dae29470174ce1.tar.gz
xen-e88a10e8c7cbeda42c18859427dae29470174ce1.tar.bz2
xen-e88a10e8c7cbeda42c18859427dae29470174ce1.zip
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>
Diffstat (limited to 'buildconfigs')
-rw-r--r--buildconfigs/mk.linux-2.6-pvops1
-rw-r--r--buildconfigs/mk.linux-2.6-tip-latest1
-rw-r--r--buildconfigs/src.git-clone45
3 files changed, 8 insertions, 39 deletions
diff --git a/buildconfigs/mk.linux-2.6-pvops b/buildconfigs/mk.linux-2.6-pvops
index 56e606f179..5f0f555a21 100644
--- a/buildconfigs/mk.linux-2.6-pvops
+++ b/buildconfigs/mk.linux-2.6-pvops
@@ -6,7 +6,6 @@ IMAGE_TARGET ?= bzImage
XEN_LINUX_CONFIG_UPDATE := buildconfigs/enable-xen-config
XEN_LINUX_GIT_URL ?= git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git
-XEN_LINUX_GIT_REMOTENAME ?= xen
XEN_LINUX_GIT_REMOTEBRANCH ?= xen-tip/master
EXTRAVERSION ?=
diff --git a/buildconfigs/mk.linux-2.6-tip-latest b/buildconfigs/mk.linux-2.6-tip-latest
index 78a9ecb746..e5dcd3bfba 100644
--- a/buildconfigs/mk.linux-2.6-tip-latest
+++ b/buildconfigs/mk.linux-2.6-tip-latest
@@ -6,7 +6,6 @@ IMAGE_TARGET ?= bzImage vmlinux
XEN_LINUX_CONFIG_UPDATE := buildconfigs/enable-xen-config
XEN_LINUX_GIT_URL ?= git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip.git
-XEN_LINUX_GIT_REMOTENAME ?= x86
XEN_LINUX_GIT_REMOTEBRANCH ?= auto-latest
EXTRAVERSION ?=
diff --git a/buildconfigs/src.git-clone b/buildconfigs/src.git-clone
index 722d45a865..b871202689 100644
--- a/buildconfigs/src.git-clone
+++ b/buildconfigs/src.git-clone
@@ -8,9 +8,6 @@ ifeq ($(XEN_LINUX_GIT_URL),)
.ERROR: XEN_LINUX_GIT_URL not specified
endif
-# The name to use for the remote repository
-XEN_LINUX_GIT_REMOTENAME ?= origin
-
# The branch in the remote repository
ifeq ($(XEN_LINUX_GIT_REMOTEBRANCH),)
.ERROR: XEN_LINUX_GIT_REMOTEBRANCH not specified
@@ -22,39 +19,13 @@ XEN_LINUX_GIT_LOCALBRANCH ?= master
XEN_LINUX_GITREV ?=
$(LINUX_SRCDIR)/.valid-src: $(__XEN_LINUX_UPDATE)
- @set -e ; if [ -d $(LINUX_SRCDIR) ] && [ ! -d $(GIT_DIR) ] ; then \
- echo "$(LINUX_SRCDIR) exists but is not a git repository." 1>&2 ; \
- false ; \
- fi
-
- @set -e ; if [ ! -e $(LINUX_SRCDIR)/.git ] ; then \
- mkdir $(LINUX_SRCDIR) ; \
- cd $(LINUX_SRCDIR) ; \
- $(GIT) init-db ; \
+ set -ex; \
+ if ! [ -d $(LINUX_SRCDIR) ]; then \
+ rm -rf $(LINUX_SRCDIR) $(LINUX_SRCDIR).tmp; \
+ mkdir $(LINUX_SRCDIR).tmp; rmdir $(LINUX_SRCDIR).tmp; \
+ $(GIT) clone $(XEN_LINUX_GIT_URL) $(LINUX_SRCDIR).tmp; \
+ cd $(LINUX_SRCDIR).tmp; \
+ $(GIT) checkout $(XEN_LINUX_GIT_REMOTEBRANCH); \
+ cd ..; mv $(LINUX_SRCDIR).tmp $(LINUX_SRCDIR); \
fi
-
- @set -e ; cd $(LINUX_SRCDIR) ; \
- if ! $(GIT) remote | grep -q $(XEN_LINUX_GIT_REMOTENAME) ; then \
- echo "Adding remote git repository \`$(XEN_LINUX_GIT_URL)' as \`$(XEN_LINUX_GIT_REMOTENAME)'" ; \
- $(GIT) remote add $(XEN_LINUX_GIT_REMOTENAME) $(XEN_LINUX_GIT_URL) ; \
- fi
-
- @echo "Updating remote \`$(XEN_LINUX_GIT_REMOTENAME)'"
- @cd $(LINUX_SRCDIR) && $(GIT) fetch $(XEN_LINUX_GIT_REMOTENAME)
-
- @set -e ; cd $(LINUX_SRCDIR) ; \
- if ! $(GIT) branch -l | grep -q $(XEN_LINUX_GIT_LOCALBRANCH) ; then \
- $(GIT) branch --track $(XEN_LINUX_GIT_LOCALBRANCH) \
- $(XEN_LINUX_GIT_REMOTENAME)/$(XEN_LINUX_GIT_REMOTEBRANCH) ; \
- $(GIT) checkout ; \
- fi
-
- @ set -e ; cd $(LINUX_SRCDIR) ; \
- if [ -n "$(XEN_LINUX_GITREV)" ] ; then \
- echo "Updating $(LINUX_SRCDIR) to revision \'$(XEN_LINUX_GITREV)'." ; \
- $(GIT) reset --hard $(XEN_LINUX_GITREV) ; \
- else \
- $(GIT) reset --hard $(XEN_LINUX_GIT_REMOTENAME)/$(XEN_LINUX_GIT_REMOTEBRANCH) ; \
- fi
-
touch $@