WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] refetch qemu if QEMU_TAG changed

To: Brendan Cully <brendan@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] refetch qemu if QEMU_TAG changed
From: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Date: Tue, 9 Nov 2010 14:23:52 +0000
Cc: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 09 Nov 2010 06:24:34 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20101029161233.GA13390@xxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <fca5fe608144ae6e82f4.1288335458@nehalem1> <1288336835.8069.18.camel@xxxxxxxxxxxxxxxxxxxxx> <20101029161233.GA13390@xxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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:




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>