qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: peter.maydell@linaro.org
Cc: famz@redhat.com, qemu-devel@nongnu.org,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [Qemu-devel] [PATCH for 2.10 v2 4/6] docker: docker.py make --no-cache skip checksum test
Date: Tue, 25 Jul 2017 14:34:23 +0100	[thread overview]
Message-ID: <20170725133425.436-5-alex.bennee@linaro.org> (raw)
In-Reply-To: <20170725133425.436-1-alex.bennee@linaro.org>

If you invoke with NOCACHE=1 we pass --no-cache in the argv to
docker.py but may still not force a rebuild if the dockerfile checksum
hasn't changed. By testing for its presence we can force builds
without having to manually remove the docker image.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/docker.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index ee40ca04d9..aab1648cc5 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -261,7 +261,8 @@ class BuildCommand(SubCommand):
         tag = args.tag
 
         dkr = Docker()
-        if dkr.image_matches_dockerfile(tag, dockerfile):
+        if "--no-cache" not in argv and \
+           dkr.image_matches_dockerfile(tag, dockerfile):
             if not args.quiet:
                 print "Image is up to date."
         else:
-- 
2.13.0

  parent reply	other threads:[~2017-07-25 13:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-25 13:34 [Qemu-devel] [PATCH for 2.10 v2 0/6] Various docker fixes Alex Bennée
2017-07-25 13:34 ` [Qemu-devel] [PATCH for 2.10 v2 1/6] docker: ensure NOUSER for travis images Alex Bennée
2017-07-25 13:34 ` [Qemu-devel] [PATCH for 2.10 v2 2/6] docker: fix dirty/stash detection on some systems Alex Bennée
2017-07-25 13:34 ` [Qemu-devel] [PATCH for 2.10 v2 3/6] docker: ignore submodules when checking diff Alex Bennée
2017-07-25 13:34 ` Alex Bennée [this message]
2017-07-25 13:34 ` [Qemu-devel] [PATCH for 2.10 v2 5/6] docker: don't install device-tree-compiler build-deps in travis.docker Alex Bennée
2017-07-25 14:17   ` Philippe Mathieu-Daudé
2017-07-25 14:28     ` Philippe Mathieu-Daudé
2017-07-25 14:39     ` Alex Bennée
2017-07-25 13:34 ` [Qemu-devel] [PATCH for 2.10 v2 6/6] docker: reduce noise when building travis.docker Alex Bennée
2017-07-25 14:18   ` Eric Blake
2017-07-25 14:25   ` Philippe Mathieu-Daudé
2017-08-31  6:59 ` [Qemu-devel] [PATCH for 2.10 v2 0/6] Various docker fixes Fam Zheng
2017-09-05  7:54   ` Alex Bennée

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=20170725133425.436-5-alex.bennee@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=f4bug@amsat.org \
    --cc=famz@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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).