qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: cota@braap.org, famz@redhat.com, berrange@redhat.com,
	f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com,
	aurelien@aurel32.net, agraf@suse.de, pbonzini@redhat.com,
	stefanha@redhat.com, stefanb@linux.vnet.ibm.com,
	marcandre.lureau@redhat.com
Cc: qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>
Subject: [Qemu-devel] [RFC PATCH 3/3] docker: remove SUBMAKE_NOCACHE_HACK for debian-sid based images
Date: Fri,  8 Jun 2018 17:04:32 +0100	[thread overview]
Message-ID: <20180608160432.8734-4-alex.bennee@linaro.org> (raw)
In-Reply-To: <20180608160432.8734-1-alex.bennee@linaro.org>

Now we can conditionally make docker-image-debian-sid a dependency
depending on if we actually need to re-build our image we can remove
this hack and use that mechanism.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/Makefile.include | 25 ++++++++++++++-----------
 tests/tcg/Makefile.include    |  1 -
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 3393e9f97d..2ce72de180 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -66,18 +66,21 @@ docker-image-debian-win64-cross: docker-image-debian8-mxe
 # its children. However when doing check-tcg we ensure everything is
 # built at top-level make so we can dispense with NOCACHE here to
 # avoid excessive re-builds.
-ifneq ($(SUBMAKE_NOCACHE_HACK),y)
 docker-image-debian-sid: NOCACHE=1
-endif
-
-docker-image-debian-alpha-cross: docker-image-debian-sid
-docker-image-debian-hppa-cross: docker-image-debian-sid
-docker-image-debian-m68k-cross: docker-image-debian-sid
-docker-image-debian-sh4-cross: docker-image-debian-sid
-docker-image-debian-sparc64-cross: docker-image-debian-sid
-docker-image-debian-mips64-cross: docker-image-debian-sid
-docker-image-debian-riscv64-cross: docker-image-debian-sid
-docker-image-debian-powerpc-cross: docker-image-debian-sid
+
+# $1 = dockerfile, $2 = dependancy
+cond-dock-dep = $(if \
+	$(call $(DOCKER_SCRIPT) check --quiet \
+		-t qemu:$1 $(DOCKER_FILES_DIR)/$1.docker),$2)
+
+docker-image-debian-alpha-cross: $(call cond-dock-dep,debian-alpha-cross,docker-image-debian-sid)
+docker-image-debian-hppa-cross: $(call cond-dock-dep,debian-hppa-cross,docker-image-debian-sid)
+docker-image-debian-m68k-cross: $(call cond-dock-dep,debian-m68k-cross,docker-image-debian-sid)
+docker-image-debian-sh4-cross: $(call cond-dock-dep,debian-sh4-cross,docker-image-debian-sid)
+docker-image-debian-sparc64-cross: $(call cond-dock-dep,debian-sparc64-cross,docker-image-debian-sid)
+docker-image-debian-mips64-cross: $(call cond-dock-dep,debian-mip64-cross,docker-image-debian-sid)
+docker-image-debian-riscv64-cross: $(call cond-dock-dep,debian-riscv64-cross,docker-image-debian-sid)
+docker-image-debian-powerpc-cross: $(call cond-dock-dep,debian-powerpc-cross,docker-image-debian-sid)
 docker-image-travis: NOUSER=1
 
 # Specialist build images, sometimes very limited tools
diff --git a/tests/tcg/Makefile.include b/tests/tcg/Makefile.include
index 951f40c28d..4851df0951 100644
--- a/tests/tcg/Makefile.include
+++ b/tests/tcg/Makefile.include
@@ -39,7 +39,6 @@ ifeq ($(HAVE_USER_DOCKER)$(GUEST_BUILD),y)
 ifneq ($(DOCKER_IMAGE),)
 
 # We also need the Docker make rules to depend on
-SUBMAKE_NOCACHE_HACK=y
 include $(SRC_PATH)/tests/docker/Makefile.include
 
 DOCKER_COMPILE_CMD="$(DOCKER_SCRIPT) cc --user $(shell id -u) \
-- 
2.17.1

      parent reply	other threads:[~2018-06-08 16:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08 16:04 [Qemu-devel] [RFC PATCH 0/3] Better docker dependency checking Alex Bennée
2018-06-08 16:04 ` [Qemu-devel] [RFC PATCH 1/3] docker: docker.py don't conflate checksums for extra_files Alex Bennée
2018-06-08 16:04 ` [Qemu-devel] [RFC PATCH 2/3] dcoker: docker.py add check sub-command Alex Bennée
2018-06-08 16:04 ` Alex Bennée [this message]

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=20180608160432.8734-4-alex.bennee@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=agraf@suse.de \
    --cc=aurelien@aurel32.net \
    --cc=balrogg@gmail.com \
    --cc=berrange@redhat.com \
    --cc=cota@braap.org \
    --cc=f4bug@amsat.org \
    --cc=famz@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=stefanb@linux.vnet.ibm.com \
    --cc=stefanha@redhat.com \
    /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).