qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Fam Zheng" <fam@euphon.net>,
	"Daniel P . Berrange" <berrange@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: [Qemu-devel] [PATCH 2/2] archive-source.sh: Clone the submodules locally
Date: Thu, 24 Jan 2019 02:00:23 +0100	[thread overview]
Message-ID: <20190124010023.24397-3-philmd@redhat.com> (raw)
In-Reply-To: <20190124010023.24397-1-philmd@redhat.com>

We cloned the QEMU repository from the local storage. Since the
submodules are also available there, clone them too. This is
quicker and reduce network use.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 scripts/archive-source.sh | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh
index 62bd22578b..e80c47caa3 100755
--- a/scripts/archive-source.sh
+++ b/scripts/archive-source.sh
@@ -38,6 +38,10 @@ else
 fi
 git clone --shared . "$vroot_dir"
 test $? -ne 0 && error "failed to clone into '$vroot_dir'"
+for sm in $submodules; do
+    git clone --shared "$sm" "$vroot_dir/$sm"
+    test $? -ne 0 && error "failed to clone submodule $sm"
+done
 
 cd "$vroot_dir"
 test $? -ne 0 && error "failed to change into '$vroot_dir'"
@@ -45,11 +49,6 @@ test $? -ne 0 && error "failed to change into '$vroot_dir'"
 git checkout $HEAD
 test $? -ne 0 && error "failed to checkout $HEAD revision"
 
-for sm in $submodules; do
-    git submodule update --init $sm
-    test $? -ne 0 && error "failed to init submodule $sm"
-done
-
 if test -n "$submodules"; then
     {
         git ls-files || error "git ls-files failed"
-- 
2.20.1

  parent reply	other threads:[~2019-01-24  1:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-24  1:00 [Qemu-devel] [PATCH 0/2] archive-source.sh: Clone the submodules locally and add to MAINTAINERS Philippe Mathieu-Daudé
2019-01-24  1:00 ` [Qemu-devel] [PATCH 1/2] MAINTAINERS: Add an entry for scripts/archive-source.sh Philippe Mathieu-Daudé
2019-01-24  1:00 ` Philippe Mathieu-Daudé [this message]
2019-01-24  8:31 ` [Qemu-devel] [PATCH 0/2] archive-source.sh: Clone the submodules locally and add to MAINTAINERS Alex Bennée
2019-02-01  6:21 ` 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=20190124010023.24397-3-philmd@redhat.com \
    --to=philmd@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=fam@euphon.net \
    --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).