mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
guix package: Register non-default profiles as GC roots.
* guix/scripts/package.scm (maybe-register-gc-root): New procedure. * tests/guix-package.sh (profile): Grep the output of "guix gc --list-live" in a couple of places.
This commit is contained in:
parent
0d55c3563c
commit
d2952326ae
2 changed files with 13 additions and 0 deletions
|
@ -723,6 +723,11 @@ removed from MANIFEST."
|
|||
(_ #f))
|
||||
options))
|
||||
|
||||
(define (maybe-register-gc-root store profile)
|
||||
"Register PROFILE as a GC root, unless it doesn't need it."
|
||||
(unless (string=? profile %current-profile)
|
||||
(add-indirect-root store (canonicalize-path profile))))
|
||||
|
||||
|
||||
;;;
|
||||
;;; Entry point.
|
||||
|
@ -915,6 +920,7 @@ more information.~%"))
|
|||
(let ((count (length entries)))
|
||||
(switch-symlinks name prof)
|
||||
(switch-symlinks profile name)
|
||||
(maybe-register-gc-root (%store) profile)
|
||||
(format #t (N_ "~a package in profile~%"
|
||||
"~a packages in profile~%"
|
||||
count)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue