From dab41865b207a13dbba490d73af895e47f5b49b5 Mon Sep 17 00:00:00 2001 From: "Ivan A. Melnikov" Date: Fri, 22 Feb 2019 12:42:23 +0400 Subject: [PATCH] build-vm: proper cleanup for *.img We should delete the tarball whenever it's not the target. --- features.in/build-vm/lib/90-build-vm.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/features.in/build-vm/lib/90-build-vm.mk b/features.in/build-vm/lib/90-build-vm.mk index 9b9396b7..3add5b85 100644 --- a/features.in/build-vm/lib/90-build-vm.mk +++ b/features.in/build-vm/lib/90-build-vm.mk @@ -39,7 +39,10 @@ prepare-image: check-sudo convert-image: prepare-image @VM_COMPRESS=; \ case "$(IMAGE_TYPE)" in \ - "img") mv "$(VM_RAWDISK)" "$(IMAGE_OUTPATH)"; exit 0;; \ + "img") \ + mv "$(VM_RAWDISK)" "$(IMAGE_OUTPATH)"; \ + if [ "0$(DEBUG)" -le 1 ]; then rm "$(VM_TARBALL)"; fi; \ + exit 0;; \ "vhd") VM_FORMAT="vpc";; \ "qcow2c") VM_FORMAT="qcow2"; VM_COMPRESS="-c";; \ *) VM_FORMAT="$(IMAGE_TYPE)"; \