qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org, famz@redhat.com
Subject: Re: [Qemu-devel] [PATCH] scripts: use git archive in archive-source
Date: Thu, 31 Jan 2019 10:26:36 +0000	[thread overview]
Message-ID: <20190131102636.GE19982@redhat.com> (raw)
In-Reply-To: <20190131074143.qw6thiywzrgq7etd@sirius.home.kraxel.org>

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 :|

  reply	other threads:[~2019-01-31 10:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-30  6:55 [Qemu-devel] [PATCH] scripts: use git archive in archive-source Gerd Hoffmann
2019-01-30 12:04 ` Daniel P. Berrangé
2019-01-31  7:41   ` Gerd Hoffmann
2019-01-31 10:26     ` Daniel P. Berrangé [this message]
2019-01-31 18:17 ` no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190131102636.GE19982@redhat.com \
    --to=berrange@redhat.com \
    --cc=famz@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).