From 4ab59f46b41d17ed18e4019abf6738debf8fcc00 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 27 Aug 2024 16:19:03 +0100 Subject: Stop using profiles for channel instances Just use the store item instead. This should avoid issues where the profile gets GC'd. --- guix-data-service/jobs/load-new-guix-revision.scm | 32 +++-------------------- 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm index ef07797..f97c0a9 100644 --- a/guix-data-service/jobs/load-new-guix-revision.scm +++ b/guix-data-service/jobs/load-new-guix-revision.scm @@ -1385,27 +1385,7 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1" (derivation-file-name (manifest-entry-item (first - (manifest-entries manifest))))))) - (profile - . ,(catch #t - (lambda () - (and manifest - (add-tmp-root-and-return-drv - (derivation-file-name - (parameterize ((%current-system system)) - (run-with-store store - (profile-derivation - manifest - #:hooks %channel-profile-hooks))))))) - (lambda (key . args) - (simple-format - (current-error-port) - "error: while computing profile derivation for ~A\n" - system) - (simple-format - (current-error-port) - "error ~A: ~A\n" key args) - #f)))))))) + (manifest-entries manifest)))))))))))) (define (start-inferior inferior-store) (let ((inferior @@ -1559,16 +1539,11 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1" (define (channel-derivations-by-system->guix-store-item channel-derivations-by-system) - (define (store-item->guix-store-item filename) - (dirname - (readlink - (string-append filename "/bin")))) - (let ((derivation-file-name-for-current-system (assoc-ref (assoc-ref channel-derivations-by-system (%current-system)) - 'profile))) + 'manifest-entry-item))) (if derivation-file-name-for-current-system (let ((derivation-for-current-system (read-derivation-from-file derivation-file-name-for-current-system))) @@ -1578,8 +1553,7 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1" (build-derivations store (list derivation-for-current-system))))) (values - (store-item->guix-store-item - (derivation->output-path derivation-for-current-system)) + (derivation->output-path derivation-for-current-system) derivation-file-name-for-current-system)) #f))) -- cgit v1.2.3