* [PATCH] refetch qemu if QEMU_TAG changed
@ 2010-10-29 6:57 Juergen Gross
2010-10-29 7:20 ` Ian Campbell
0 siblings, 1 reply; 6+ messages in thread
From: Juergen Gross @ 2010-10-29 6:57 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 233 bytes --]
Check for a changed QEMU_TAG. If it has changed since last build, delete old
qemu sources and refetch with new QEMU_TAG.
Signed-off-by: juergen.gross@ts.fujitsu.com
1 file changed, 8 insertions(+)
tools/Makefile | 8 ++++++++
[-- Attachment #2: xen-work.patch --]
[-- Type: text/x-patch, Size: 1146 bytes --]
# HG changeset patch
# User Juergen Gross <juergen.gross@ts.fujitsu.com>
# Date 1288335441 -7200
# Node ID fca5fe608144ae6e82f48c314639b2fe59d2cfcd
# Parent d60c1258c6b75f6de0bb9e09b27ac9e86c974908
refetch qemu if QEMU_TAG changed
Check for a changed QEMU_TAG. If it has changed since last build, delete old
qemu sources and refetch with new QEMU_TAG.
Signed-off-by: juergen.gross@ts.fujitsu.com
diff -r d60c1258c6b7 -r fca5fe608144 tools/Makefile
--- a/tools/Makefile Fri Oct 29 07:54:27 2010 +0200
+++ b/tools/Makefile Fri Oct 29 08:57:21 2010 +0200
@@ -91,6 +91,13 @@
$(MAKE) -C ioemu distclean
ioemu-dir-find:
+ set -e; \
+ if [ "$(QEMU_TAG)" ]; then \
+ if [ ! -r qemu_tag.$(QEMU_TAG) ]; then \
+ rm -f ioemu-dir qemu_tag.* 2>/dev/null; \
+ rm -rf ioemu-remote $(CONFIG_QEMU) 2>/dev/null; \
+ fi; \
+ fi
set -ex; \
if test -d $(CONFIG_QEMU); then \
rm -f ioemu-dir; \
@@ -105,6 +112,7 @@
$(GIT) branch -D dummy >/dev/null 2>&1 ||:; \
$(GIT) checkout -b dummy $(QEMU_TAG); \
cd ..; \
+ > qemu_tag.$(QEMU_TAG); \
fi; \
mv ioemu-remote.tmp ioemu-remote; \
fi; \
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] refetch qemu if QEMU_TAG changed
2010-10-29 6:57 [PATCH] refetch qemu if QEMU_TAG changed Juergen Gross
@ 2010-10-29 7:20 ` Ian Campbell
2010-10-29 7:31 ` Juergen Gross
2010-10-29 16:12 ` Brendan Cully
0 siblings, 2 replies; 6+ messages in thread
From: Ian Campbell @ 2010-10-29 7:20 UTC (permalink / raw)
To: Juergen Gross; +Cc: xen-devel@lists.xensource.com
On Fri, 2010-10-29 at 07:57 +0100, Juergen Gross wrote:
> Check for a changed QEMU_TAG. If it has changed since last build, delete old
> qemu sources and refetch with new QEMU_TAG.
Deleteing and recloning seems like an awfully big hammer. Can the same
not be achieved with a "git fetch origin" and a "git reset <tag>"?
Ian.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] refetch qemu if QEMU_TAG changed
2010-10-29 7:20 ` Ian Campbell
@ 2010-10-29 7:31 ` Juergen Gross
2010-10-29 16:12 ` Brendan Cully
1 sibling, 0 replies; 6+ messages in thread
From: Juergen Gross @ 2010-10-29 7:31 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel@lists.xensource.com
On 10/29/10 09:20, Ian Campbell wrote:
> On Fri, 2010-10-29 at 07:57 +0100, Juergen Gross wrote:
>> Check for a changed QEMU_TAG. If it has changed since last build, delete old
>> qemu sources and refetch with new QEMU_TAG.
>
> Deleteing and recloning seems like an awfully big hammer. Can the same
> not be achieved with a "git fetch origin" and a "git reset<tag>"?
I'm no git expert :-)
I just created an automated version of the currently supported "official" way
to handle this kind of problem (make distclean) without deleting everything.
I don't know if there are any nasty side effects possible with your proposal,
so it would be nice if someone with more git experience could set up a better
solution.
Juergen
--
Juergen Gross Principal Developer Operating Systems
TSP ES&S SWE OS6 Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions e-mail: juergen.gross@ts.fujitsu.com
Domagkstr. 28 Internet: ts.fujitsu.com
D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] refetch qemu if QEMU_TAG changed
2010-10-29 7:20 ` Ian Campbell
2010-10-29 7:31 ` Juergen Gross
@ 2010-10-29 16:12 ` Brendan Cully
2010-11-09 14:23 ` Ian Campbell
1 sibling, 1 reply; 6+ messages in thread
From: Brendan Cully @ 2010-10-29 16:12 UTC (permalink / raw)
To: Ian Campbell; +Cc: Juergen Gross, xen-devel@lists.xensource.com
On Friday, 29 October 2010 at 08:20, Ian Campbell wrote:
> On Fri, 2010-10-29 at 07:57 +0100, Juergen Gross wrote:
> > Check for a changed QEMU_TAG. If it has changed since last build, delete old
> > qemu sources and refetch with new QEMU_TAG.
>
> Deleteing and recloning seems like an awfully big hammer. Can the same
> not be achieved with a "git fetch origin" and a "git reset <tag>"?
In any case, it should probably only do that if the currently
checked-out version matches the old value of QEMU_TAG and the
directory has no source modifications, indicating the builder is just
using the default build. Otherwise it should just warn that QEMU_TAG
has changed and the ioemu directory may have become out of date.
With the proposed patch it's very easy to destroy a developer's code.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] refetch qemu if QEMU_TAG changed
2010-10-29 16:12 ` Brendan Cully
@ 2010-11-09 14:23 ` Ian Campbell
2010-11-09 18:15 ` Ian Jackson
0 siblings, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2010-11-09 14:23 UTC (permalink / raw)
To: Brendan Cully; +Cc: Juergen Gross, xen-devel@lists.xensource.com
On Fri, 2010-10-29 at 17:12 +0100, Brendan Cully wrote:
> On Friday, 29 October 2010 at 08:20, Ian Campbell wrote:
> > On Fri, 2010-10-29 at 07:57 +0100, Juergen Gross wrote:
> > > Check for a changed QEMU_TAG. If it has changed since last build, delete old
> > > qemu sources and refetch with new QEMU_TAG.
> >
> > Deleteing and recloning seems like an awfully big hammer. Can the same
> > not be achieved with a "git fetch origin" and a "git reset <tag>"?
>
> In any case, it should probably only do that if the currently
> checked-out version matches the old value of QEMU_TAG and the
> directory has no source modifications, indicating the builder is just
> using the default build. Otherwise it should just warn that QEMU_TAG
> has changed and the ioemu directory may have become out of date.
>
> With the proposed patch it's very easy to destroy a developer's code.
Quite right, I hadn't considered that aspect.
The following patches adds an explicit update mechanism, which isn't
brilliant but is better than doing "cd tools/ioemu-remote && git reset
--hard <sha1...>" by hand.
For the old hg clone integration for linux-2.6.18-xen.hg (the stuff in
buildconfigs/*) we had XEN_LINUX_UPDATE which forced an update when set
to y. I don't know that was widely used (or indeed known about).
Your suggested warning when the tree differs from the preferred tag
would be a useful and complimentary improvement.
Ian.
diff -r b491f46546d5 -r 7228faad83f5 Makefile
--- a/Makefile Tue Nov 09 14:12:41 2010 +0000
+++ b/Makefile Tue Nov 09 14:12:41 2010 +0000
@@ -82,6 +82,10 @@ endif
tools/ioemu-dir:
$(MAKE) -C tools ioemu-dir-find
+
+.PHONY: tools/ioemu-dir-force-update
+tools/ioemu-dir-force-update:
+ $(MAKE) -C tools ioemu-dir-force-update
.PHONY: install-docs
install-docs:
diff -r b491f46546d5 -r 7228faad83f5 tools/Makefile
--- a/tools/Makefile Tue Nov 09 14:12:41 2010 +0000
+++ b/tools/Makefile Tue Nov 09 14:12:41 2010 +0000
@@ -110,6 +110,14 @@ ioemu-dir-find:
cd ioemu-dir; \
./xen-setup $(IOEMU_CONFIGURE_CROSS)
+.PHONY: ioemu-dir-force-update
+ioemu-dir-force-update:
+ set -ex; \
+ if [ "$(QEMU_TAG)" ]; then \
+ cd ioemu-remote; \
+ $(GIT) reset --hard $(QEMU_TAG); \
+ fi
+
subdir-all-ioemu-dir subdir-install-ioemu-dir: ioemu-dir-find
subdir-clean-ioemu-dir:
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] refetch qemu if QEMU_TAG changed
2010-11-09 14:23 ` Ian Campbell
@ 2010-11-09 18:15 ` Ian Jackson
0 siblings, 0 replies; 6+ messages in thread
From: Ian Jackson @ 2010-11-09 18:15 UTC (permalink / raw)
To: Ian Campbell; +Cc: Brendan Cully, Juergen Gross, xen-devel@lists.xensource.com
Ian Campbell writes ("Re: [Xen-devel] [PATCH] refetch qemu if QEMU_TAG changed"):
> The following patches adds an explicit update mechanism, which isn't
> brilliant but is better than doing "cd tools/ioemu-remote && git reset
> --hard <sha1...>" by hand.
This seemed like a step in the right direction, so I wrote a commit
comment, signed it off, and applied it.
Ian.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-11-09 18:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-29 6:57 [PATCH] refetch qemu if QEMU_TAG changed Juergen Gross
2010-10-29 7:20 ` Ian Campbell
2010-10-29 7:31 ` Juergen Gross
2010-10-29 16:12 ` Brendan Cully
2010-11-09 14:23 ` Ian Campbell
2010-11-09 18:15 ` Ian Jackson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.