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 v3 4/6] docker: docker.py make --no-cache skip checksum test
Date: Mon,  7 Aug 2017 16:39:32 +0100	[thread overview]
Message-ID: <20170807153934.29477-5-alex.bennee@linaro.org> (raw)
In-Reply-To: <20170807153934.29477-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-08-07 15:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-07 15:39 [Qemu-devel] [PATCH for 2.10 v3 0/6] Various docker fixes Alex Bennée
2017-08-07 15:39 ` [Qemu-devel] [PATCH for 2.10 v3 1/6] docker: ensure NOUSER for travis images Alex Bennée
2017-08-08  1:38   ` Fam Zheng
2017-08-08  8:55     ` Alex Bennée
2017-08-07 15:39 ` [Qemu-devel] [PATCH for 2.10 v3 2/6] docker: fix dirty/stash detection on some systems Alex Bennée
2017-08-07 15:39 ` [Qemu-devel] [PATCH for 2.10 v3 3/6] docker: ignore submodules when checking diff Alex Bennée
2017-08-07 15:39 ` Alex Bennée [this message]
2017-08-08  1:43   ` [Qemu-devel] [PATCH for 2.10 v3 4/6] docker: docker.py make --no-cache skip checksum test Fam Zheng
2017-08-08  8:51     ` Alex Bennée
2017-08-08 12:39       ` Fam Zheng
2017-08-07 15:39 ` [Qemu-devel] [PATCH for 2.10 v3 5/6] docker: don't install device-tree-compiler build-deps in travis.docker Alex Bennée
2017-08-09 13:53   ` Philippe Mathieu-Daudé
2017-08-07 15:39 ` [Qemu-devel] [PATCH for 2.10 v3 6/6] docker: reduce noise when building travis.docker 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=20170807153934.29477-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).