[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/14: Make sure to keep roots for channel instance derivations
From: |
Christopher Baines |
Subject: |
05/14: Make sure to keep roots for channel instance derivations |
Date: |
Fri, 2 Feb 2024 10:58:38 -0500 (EST) |
cbaines pushed a commit to branch master
in repository data-service.
commit 0f7b31c605150eeca14c10d8c14913a1318e9506
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Sun Jan 28 08:18:44 2024 +0000
Make sure to keep roots for channel instance derivations
---
guix-data-service/jobs/load-new-guix-revision.scm | 26 +++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/guix-data-service/jobs/load-new-guix-revision.scm
b/guix-data-service/jobs/load-new-guix-revision.scm
index 464a5d7..141ebdd 100644
--- a/guix-data-service/jobs/load-new-guix-revision.scm
+++ b/guix-data-service/jobs/load-new-guix-revision.scm
@@ -1132,6 +1132,7 @@
(list channel)
#:authenticate?
fetch-with-authentication?)))))))
+ (pool-store-connections '())
(inferior-and-store-pool
(make-resource-pool
(lambda ()
@@ -1139,14 +1140,20 @@
(inferior (start-inferior inferior-store)))
(ensure-non-blocking-store-connection inferior-store)
(make-inferior-non-blocking! inferior)
+ (call-with-blocked-asyncs
+ (lambda ()
+ (set! pool-store-connections
+ (cons inferior-store pool-store-connections))))
(cons inferior inferior-store)))
parallelism
#:min-size 0
#:idle-seconds 10
#:destructor (match-lambda
((inferior . store)
- (close-inferior inferior)
- (close-connection store)))))
+ ;; Just close the inferior here, close the store
+ ;; connection later to keep the temporary roots
+ ;; alive
+ (close-inferior inferior)))))
(systems
(with-resource-from-pool inferior-and-store-pool res
(match res
@@ -1173,6 +1180,21 @@
system)))))))
systems)))
+ (for-each
+ (match-lambda
+ ((_ . manifest-and-profile)
+ (and=> (assq-ref manifest-and-profile 'manifest-entry-item)
+ (lambda (drv)
+ (add-temp-root store drv)))
+ (and=> (assq-ref manifest-and-profile 'profile)
+ (lambda (drv)
+ (add-temp-root store drv)))))
+ result)
+
+ ;; Now the roots have been added to the main store connection, close the
+ ;; pool ones
+ (for-each close-connection pool-store-connections)
+
(cons
(channel-instance-checkout channel-instance)
result)))
- branch master updated (e0a6c84 -> ac1a4cb), Christopher Baines, 2024/02/02
- 01/14: Remove some time logging, Christopher Baines, 2024/02/02
- 04/14: Remove even more time logging, Christopher Baines, 2024/02/02
- 02/14: Log the time to call inferior-packages-plus-replacements, Christopher Baines, 2024/02/02
- 05/14: Make sure to keep roots for channel instance derivations,
Christopher Baines <=
- 07/14: Add more logging in when computing channel instance derivations, Christopher Baines, 2024/02/02
- 09/14: Split up handling of package description data, Christopher Baines, 2024/02/02
- 10/14: Fix exception handling in call-with-temporary-thread, Christopher Baines, 2024/02/02
- 12/14: Speed up loading package metadata, Christopher Baines, 2024/02/02
- 14/14: Cleanup some with-time-logging, Christopher Baines, 2024/02/02
- 06/14: Add some time logging in to inferior-packages-plus-replacements, Christopher Baines, 2024/02/02
- 11/14: Ignore inferior-protocol-error when computing channel instances, Christopher Baines, 2024/02/02
- 13/14: Compute lint warnings in parallel, Christopher Baines, 2024/02/02
- 08/14: Speed up fetching package replacements, Christopher Baines, 2024/02/02
- 03/14: Improve logging when computing a channel instance derivation fails, Christopher Baines, 2024/02/02