[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] scripts: use git archive in archive-source
From: |
Daniel P . Berrangé |
Subject: |
Re: [Qemu-devel] [PATCH] scripts: use git archive in archive-source |
Date: |
Thu, 31 Jan 2019 10:26:36 +0000 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Thu, Jan 31, 2019 at 08:41:43AM +0100, Gerd Hoffmann wrote:
> Hi,
>
> > > +git archive --format tar $HEAD > "$tar_file"
> > > +test $? -ne 0 && error "failed to archive qemu"
> > > for sm in $submodules; do
> > > - git submodule update --init $sm
> > > - test $? -ne 0 && error "failed to init submodule $sm"
> > > + git submodule update --init "$sm"
> >
> > The current archive-source.sh code is careful to not touch the
> > developer's current git checkout, because it runs submodule
> > update in a clone'd tree. The earlier patch hunk gets rid of the
> > clone, so now submodule update is touching the developer's master
> > git checkout. IMHO this is not acceptable - running tests (which
> > use archive-source.sh) must never alter the developer's git checkout
> > status in any way.
>
> Can easily be fixed, the sha1 can be pulled out of "git submodule
> status" instead of updating the submodules & use HEAD.
>
> The only question is what to do best on uninitialized submodules.
> Options are:
> * fetch the submodule into the developer tree (once).
As above, we shouldn't ever touch the developer's git state.
> * clone the submodule into a temporary directory (each run).
IMHO this is the only option
> * throw an error.
Definitely don't want this, as an uninitialized submodule is going to
be a common case for the 'dtc' module when people have the suitable
version already on their host, so this would break the CI scripts.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|