|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] buildconfigs/src.git-clone: use git clone
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1245335568 -3600
# Node ID dc0d1200e3f3c1e06de2c8c15104e8c64ba56e0d
# Parent af06333d4c5d8aeb629e80163cc3707a6625d1cf
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@xxxxxxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
buildconfigs/mk.linux-2.6-pvops | 1
buildconfigs/mk.linux-2.6-tip-latest | 1
buildconfigs/src.git-clone | 45 ++++++-----------------------------
3 files changed, 8 insertions(+), 39 deletions(-)
diff -r af06333d4c5d -r dc0d1200e3f3 buildconfigs/mk.linux-2.6-pvops
--- a/buildconfigs/mk.linux-2.6-pvops Thu Jun 18 10:46:21 2009 +0100
+++ b/buildconfigs/mk.linux-2.6-pvops Thu Jun 18 15:32:48 2009 +0100
@@ -6,7 +6,6 @@ XEN_LINUX_CONFIG_UPDATE := buildconfigs/
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 -r af06333d4c5d -r dc0d1200e3f3 buildconfigs/mk.linux-2.6-tip-latest
--- a/buildconfigs/mk.linux-2.6-tip-latest Thu Jun 18 10:46:21 2009 +0100
+++ b/buildconfigs/mk.linux-2.6-tip-latest Thu Jun 18 15:32:48 2009 +0100
@@ -6,7 +6,6 @@ XEN_LINUX_CONFIG_UPDATE := buildconfigs/
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 -r af06333d4c5d -r dc0d1200e3f3 buildconfigs/src.git-clone
--- a/buildconfigs/src.git-clone Thu Jun 18 10:46:21 2009 +0100
+++ b/buildconfigs/src.git-clone Thu Jun 18 15:32:48 2009 +0100
@@ -7,9 +7,6 @@ ifeq ($(XEN_LINUX_GIT_URL),)
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),)
@@ -22,39 +19,13 @@ XEN_LINUX_GITREV ?=
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 ; \
+ 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 ; if [ ! -e $(LINUX_SRCDIR)/.git ] ; then \
- mkdir $(LINUX_SRCDIR) ; \
- cd $(LINUX_SRCDIR) ; \
- $(GIT) init-db ; \
- 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 $@
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] buildconfigs/src.git-clone: use git clone, avoid git remote,
Xen patchbot-unstable <=
|
|
|
|
|