aboutsummaryrefslogtreecommitdiffstats
path: root/include/scan.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2016-10-02 11:40:06 +0200
committerFelix Fietkau <nbd@nbd.name>2016-10-04 16:01:41 +0200
commit934901fb3e544e3c3ef66f6695bcf41293843bf3 (patch)
treed4f1424f97928768899ae1f3c03bb3729fb728ec /include/scan.mk
parentd2f4479870030d2ca25baeb93bbd8881d6296547 (diff)
downloadupstream-934901fb3e544e3c3ef66f6695bcf41293843bf3.tar.gz
upstream-934901fb3e544e3c3ef66f6695bcf41293843bf3.tar.bz2
upstream-934901fb3e544e3c3ef66f6695bcf41293843bf3.zip
build: leaving behind incomplete metadata files on cancelled builds
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'include/scan.mk')
-rw-r--r--include/scan.mk6
1 files 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