diff options
author | Christopher Baines <mail@cbaines.net> | 2024-06-15 19:53:20 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2024-06-15 19:53:20 +0100 |
commit | 35275d44086a1b0d78dc3b177da0448c4bfd35a4 (patch) | |
tree | c6a0e3325114162e649f30c49b22e587e0f17d73 /scripts/nar-herder.in | |
parent | 91348bd774aa4f1f2d789025728c323dcde7b466 (diff) | |
download | nar-herder-35275d44086a1b0d78dc3b177da0448c4bfd35a4.tar nar-herder-35275d44086a1b0d78dc3b177da0448c4bfd35a4.tar.gz |
Insert the narinfo record before moving the nar
So that if inserting the narinfo record fails, the nars won't be
moved.
Diffstat (limited to 'scripts/nar-herder.in')
-rw-r--r-- | scripts/nar-herder.in | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/nar-herder.in b/scripts/nar-herder.in index 49a634c..7326526 100644 --- a/scripts/nar-herder.in +++ b/scripts/nar-herder.in @@ -417,6 +417,12 @@ (read-narinfo port "https://narherderdummyvalue"))))) + (database-insert-narinfo + database + narinfo + #:tags (or (assq-ref opts 'tags) + '())) + (when canonical-storage (for-each (lambda (uri) @@ -436,12 +442,6 @@ (rename-file source dest)))) (narinfo-uris narinfo))) - (database-insert-narinfo - database - narinfo - #:tags (or (assq-ref opts 'tags) - '())) - (report) narinfo)) |