diff mbox

[v2,for,3.0,12/16] docker: drop QEMU_TARGET check, fallback in EXECUTABLE not set

Message ID 20180713121741.19262-13-alex.bennee@linaro.org (mailing list archive)
State New, archived
Headers show

Commit Message

Alex Bennée July 13, 2018, 12:17 p.m. UTC
The addition of QEMU_TARGET was intended to ensure we fall back to
checking for the existence of an image if the build system was not
currently configured to build it. However this breaks the direct use
of the rule for building custom binfmt_misc images. We already check
for EXECUTABLE so let us just use that as a proxy for deciding if we
are just going to check the image exits.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/Makefile.include | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Philippe Mathieu-Daudé July 17, 2018, 3:51 p.m. UTC | #1
On 07/13/2018 09:17 AM, Alex Bennée wrote:
> The addition of QEMU_TARGET was intended to ensure we fall back to
> checking for the existence of an image if the build system was not
> currently configured to build it. However this breaks the direct use
> of the rule for building custom binfmt_misc images. We already check
> for EXECUTABLE so let us just use that as a proxy for deciding if we
> are just going to check the image exits.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>  tests/docker/Makefile.include | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index e32c35be0d..ec23620153 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -58,13 +58,11 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker
>  docker-binfmt-image-debian-%: $(DOCKER_FILES_DIR)/debian-bootstrap.docker
>  	$(if $(EXECUTABLE),,\
>  		$(error EXECUTABLE not set, debootstrap of debian-$* would fail))
> -	$(if $(wildcard $(EXECUTABLE)),,\
> -		$(error Please build $(EXECUTABLE) first))
>  	$(if $(DEB_ARCH),,\
>  		$(error DEB_ARCH not set, debootstrap of debian-$* would fail))
>  	$(if $(DEB_TYPE),,\
>  		$(error DEB_TYPE not set, debootstrap of debian-$* would fail))
> -	$(if $(filter $(QEMU_TARGET),$(TARGET_DIRS)),				\
> +	$(if $(wildcard $(EXECUTABLE)),						\
>  		$(call quiet-command,						\
>  			DEB_ARCH=$(DEB_ARCH)					\
>  			DEB_TYPE=$(DEB_TYPE)					\
> @@ -136,7 +134,6 @@ DOCKER_PARTIAL_IMAGES += debian-tricore-cross debian-powerpc-cross fedora-i386-c
>  # broken so we need a qemu-linux-user for this target
>  docker-binfmt-image-debian-powerpc-user: DEB_ARCH = powerpc
>  docker-binfmt-image-debian-powerpc-user: DEB_TYPE = jessie
> -docker-binfmt-image-debian-powerpc-user: QEMU_TARGET = ppc-linux-user
>  docker-binfmt-image-debian-powerpc-user: EXECUTABLE = ${BUILD_DIR}/ppc-linux-user/qemu-ppc
>  docker-image-debian-powerpc-user-cross: docker-binfmt-image-debian-powerpc-user
>  DOCKER_USER_IMAGES += debian-powerpc-user
>
diff mbox

Patch

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index e32c35be0d..ec23620153 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -58,13 +58,11 @@  docker-image-%: $(DOCKER_FILES_DIR)/%.docker
 docker-binfmt-image-debian-%: $(DOCKER_FILES_DIR)/debian-bootstrap.docker
 	$(if $(EXECUTABLE),,\
 		$(error EXECUTABLE not set, debootstrap of debian-$* would fail))
-	$(if $(wildcard $(EXECUTABLE)),,\
-		$(error Please build $(EXECUTABLE) first))
 	$(if $(DEB_ARCH),,\
 		$(error DEB_ARCH not set, debootstrap of debian-$* would fail))
 	$(if $(DEB_TYPE),,\
 		$(error DEB_TYPE not set, debootstrap of debian-$* would fail))
-	$(if $(filter $(QEMU_TARGET),$(TARGET_DIRS)),				\
+	$(if $(wildcard $(EXECUTABLE)),						\
 		$(call quiet-command,						\
 			DEB_ARCH=$(DEB_ARCH)					\
 			DEB_TYPE=$(DEB_TYPE)					\
@@ -136,7 +134,6 @@  DOCKER_PARTIAL_IMAGES += debian-tricore-cross debian-powerpc-cross fedora-i386-c
 # broken so we need a qemu-linux-user for this target
 docker-binfmt-image-debian-powerpc-user: DEB_ARCH = powerpc
 docker-binfmt-image-debian-powerpc-user: DEB_TYPE = jessie
-docker-binfmt-image-debian-powerpc-user: QEMU_TARGET = ppc-linux-user
 docker-binfmt-image-debian-powerpc-user: EXECUTABLE = ${BUILD_DIR}/ppc-linux-user/qemu-ppc
 docker-image-debian-powerpc-user-cross: docker-binfmt-image-debian-powerpc-user
 DOCKER_USER_IMAGES += debian-powerpc-user