qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] docker: Clean dangling tarball files
@ 2018-08-18  3:03 Philippe Mathieu-Daudé
  2018-08-21  1:00 ` Fam Zheng
  0 siblings, 1 reply; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-08-18  3:03 UTC (permalink / raw)
  To: Alex Bennée, Fam Zheng; +Cc: Philippe Mathieu-Daudé, qemu-devel

When a container fails, it leaves a dangling tarball which name is
based on a timestamp. Further uses of make won't clean those files,
neither calling the 'docker-clean' target.

Use the .DELETE_ON_ERROR built-in target to let make remove those
temporary tarballs in case of failure.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 tests/docker/Makefile.include | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index d3101afecd..6e03235ab9 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -25,6 +25,7 @@ IMAGES ?= %
 CUR_TIME := $(shell date +%Y-%m-%d-%H.%M.%S.$$$$)
 DOCKER_SRC_COPY := $(BUILD_DIR)/docker-src.$(CUR_TIME)
 
+.DELETE_ON_ERROR: $(DOCKER_SRC_COPY)
 $(DOCKER_SRC_COPY):
 	@mkdir $@
 	$(if $(SRC_ARCHIVE), \
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] docker: Clean dangling tarball files
  2018-08-18  3:03 [Qemu-devel] [PATCH] docker: Clean dangling tarball files Philippe Mathieu-Daudé
@ 2018-08-21  1:00 ` Fam Zheng
  0 siblings, 0 replies; 2+ messages in thread
From: Fam Zheng @ 2018-08-21  1:00 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé; +Cc: Alex Bennée, qemu-devel

On Sat, 08/18 00:03, Philippe Mathieu-Daudé wrote:
> When a container fails, it leaves a dangling tarball which name is
> based on a timestamp. Further uses of make won't clean those files,
> neither calling the 'docker-clean' target.
> 
> Use the .DELETE_ON_ERROR built-in target to let make remove those
> temporary tarballs in case of failure.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  tests/docker/Makefile.include | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index d3101afecd..6e03235ab9 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -25,6 +25,7 @@ IMAGES ?= %
>  CUR_TIME := $(shell date +%Y-%m-%d-%H.%M.%S.$$$$)
>  DOCKER_SRC_COPY := $(BUILD_DIR)/docker-src.$(CUR_TIME)
>  
> +.DELETE_ON_ERROR: $(DOCKER_SRC_COPY)
>  $(DOCKER_SRC_COPY):
>  	@mkdir $@
>  	$(if $(SRC_ARCHIVE), \
> -- 
> 2.18.0
> 

Queued, thanks.

Fam

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-21  1:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-18  3:03 [Qemu-devel] [PATCH] docker: Clean dangling tarball files Philippe Mathieu-Daudé
2018-08-21  1:00 ` Fam Zheng

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).