Stop using profiles for channel instances
Just use the store item instead. This should avoid issues where the profile gets GC'd.
This commit is contained in:
parent
a204bda36d
commit
4ab59f46b4
1 changed files with 3 additions and 29 deletions
|
|
@ -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)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue