Add a procedure to fix derivation source files
I don't know how, but there are a couple in the data.guix.gnu.org database that are placeholders.
This commit is contained in:
parent
167b7d029e
commit
1181b13ffe
1 changed files with 26 additions and 1 deletions
|
|
@ -97,7 +97,8 @@
|
||||||
enqueue-load-new-guix-revision-job
|
enqueue-load-new-guix-revision-job
|
||||||
most-recent-n-load-new-guix-revision-jobs
|
most-recent-n-load-new-guix-revision-jobs
|
||||||
|
|
||||||
fix-derivation))
|
fix-derivation
|
||||||
|
fix-derivation-source-file-nar))
|
||||||
|
|
||||||
(define inferior-package-id
|
(define inferior-package-id
|
||||||
(@@ (guix inferior) inferior-package-id))
|
(@@ (guix inferior) inferior-package-id))
|
||||||
|
|
@ -1310,6 +1311,30 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1"
|
||||||
#:hz 0
|
#:hz 0
|
||||||
#:parallelism 1))
|
#:parallelism 1))
|
||||||
|
|
||||||
|
(define (fix-derivation-source-file-nar id)
|
||||||
|
(run-fibers
|
||||||
|
(lambda ()
|
||||||
|
(with-postgresql-connection
|
||||||
|
"fix"
|
||||||
|
(lambda (conn)
|
||||||
|
(let ((postgresql-connection-pool
|
||||||
|
(make-resource-pool
|
||||||
|
(const conn)
|
||||||
|
1
|
||||||
|
#:name "postgres")))
|
||||||
|
(match (exec-query
|
||||||
|
conn
|
||||||
|
"
|
||||||
|
SELECT store_path FROM derivation_source_files WHERE id = $1"
|
||||||
|
(list (number->string id)))
|
||||||
|
(((store-path))
|
||||||
|
(compute-and-update-derivation-source-file-nar
|
||||||
|
postgresql-connection-pool
|
||||||
|
id
|
||||||
|
store-path)))))))
|
||||||
|
#:hz 0
|
||||||
|
#:parallelism 1))
|
||||||
|
|
||||||
(define* (derivation-file-names->derivation-ids postgresql-connection-pool
|
(define* (derivation-file-names->derivation-ids postgresql-connection-pool
|
||||||
call-with-utility-thread
|
call-with-utility-thread
|
||||||
read-derivations/fiberized
|
read-derivations/fiberized
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue