aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-03-27 20:45:14 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-03-27 20:45:14 -0700
commit5f8c5cfb276e96527c99c057a7bbb41c77d6b73b (patch)
tree869e0faa76a53583a9a3fbfe14a15f08dfb00500
parenta6b692fc167b8fa7fbdf4ac821fdb23a7295a8cc (diff)
downloadconsfigurator-5f8c5cfb276e96527c99c057a7bbb41c77d6b73b.tar.gz
GNUPG:PUBLIC-KEY-IMPORTED: use WITH-CHANGE-IF-CHANGES-FILE
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--src/property/gnupg.lisp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/property/gnupg.lisp b/src/property/gnupg.lisp
index 84a8caf..ec42a8f 100644
--- a/src/property/gnupg.lisp
+++ b/src/property/gnupg.lisp
@@ -26,8 +26,9 @@ keyring."
(list (remove #\Space fingerprint)))
(:hostattrs
(require-data "--pgp-pubkey" fingerprint))
- (:check
- (zerop (mrun :for-exit "gpg" "--list-public-keys" fingerprint)))
(:apply
- (mrun
- :input (get-data-stream "--pgp-pubkey" fingerprint) "gpg" "--import")))
+ ;; always do an import, in case we have a newer version of the key than
+ ;; last time
+ (with-change-if-changes-file (".gnupg/pubring.kbx")
+ (mrun
+ :input (get-data-stream "--pgp-pubkey" fingerprint) "gpg" "--import"))))