Ver Fonte

build: leaving behind incomplete metadata files on cancelled builds

Signed-off-by: Felix Fietkau <[email protected]>
Felix Fietkau há 9 anos atrás
pai
commit
934901fb3e
1 ficheiros alterados com 4 adições e 2 exclusões
  1. 4 2
      include/scan.mk

+ 4 - 2
include/scan.mk

@@ -40,7 +40,8 @@ define PackageDir
 			rm -f $$@; \
 		}; \
 		echo; \
-	} > $$@ || true
+	} > [email protected]
+	mv [email protected] $$@
 endef
 
 $(OVERRIDELIST):
@@ -76,7 +77,8 @@ $(TMP_DIR)/info/.files-$(SCAN_TARGET).mk: $(FILELIST)
 			print "$$(eval $$(call PackageDir," info "," dir "," pkg "))"; \
 		} ' < $<; \
 		true; \
-	) > $@
+	) > [email protected]
+	mv [email protected] $@
 
 -include $(TMP_DIR)/info/.files-$(SCAN_TARGET).mk