From 934901fb3e544e3c3ef66f6695bcf41293843bf3 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 2 Oct 2016 11:40:06 +0200 Subject: [PATCH] build: leaving behind incomplete metadata files on cancelled builds Signed-off-by: Felix Fietkau --- include/scan.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/scan.mk b/include/scan.mk index 5af035972f..5bb263d713 100644 --- a/include/scan.mk +++ b/include/scan.mk @@ -40,7 +40,8 @@ define PackageDir rm -f $$@; \ }; \ echo; \ - } > $$@ || true + } > $$@.tmp + mv $$@.tmp $$@ endef $(OVERRIDELIST): @@ -76,7 +77,8 @@ $(TMP_DIR)/info/.files-$(SCAN_TARGET).mk: $(FILELIST) print "$$(eval $$(call PackageDir," info "," dir "," pkg "))"; \ } ' < $<; \ true; \ - ) > $@ + ) > $@.tmp + mv $@.tmp $@ -include $(TMP_DIR)/info/.files-$(SCAN_TARGET).mk -- 2.30.2