From 8c2235c9a755492a4c1aa66b6387f744b26aa780 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Fri, 1 Mar 2019 15:40:15 +0100 Subject: [PATCH] depot: delete signature file if signing failed In cases where the signing failed (maybe the passphrase for the key was not available at this time), there remained an empty .sig file, which is newer than the to-be-signed file and, therefore, prevents subsequent signing processes. --- tool/depot/publish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tool/depot/publish b/tool/depot/publish index ac27fedb32..c8479f390a 100755 --- a/tool/depot/publish +++ b/tool/depot/publish @@ -91,9 +91,9 @@ MISSING_PUBKEY_FILES := $(sort \ $(DEPOT_DIR)/$(call pubkey_filename,$A)))) $(PUBLIC_DIR)/%.xz.sig : $(PUBLIC_DIR)/%.xz - $(VERBOSE)rm -f $@; $(VERBOSE)$(GPG) --detach-sign --digest-algo SHA256 --no-tty --use-agent \ - --local-user $(call pubkey_id,$*) - < $< > $@ + --local-user $(call pubkey_id,$*) - < $< > $@ || \ + ( rm -f $@; false ) .PRECIOUS: $(TARGETS:.xz.sig=.xz)