mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
maint: update-guix-package: Protect the checkout from GC.
* build-aux/update-guix-package.scm (main): Define 'root', and call 'add-indirect-root' to protect SOURCE from GC.
This commit is contained in:
parent
59898500dd
commit
aa1c3a0000
1 changed files with 13 additions and 4 deletions
|
@ -124,10 +124,19 @@ (define (main . args)
|
|||
;; on a private branch.
|
||||
(reload-module
|
||||
(resolve-module '(gnu packages package-management)))
|
||||
(pk source
|
||||
(add-to-store store
|
||||
(origin-file-name (package-source guix))
|
||||
#t "sha256" source)))))
|
||||
|
||||
(let* ((source (add-to-store store
|
||||
(origin-file-name (package-source guix))
|
||||
#t "sha256" source))
|
||||
(root (store-path-package-name source)))
|
||||
|
||||
;; Add an indirect GC root for SOURCE in the current directory.
|
||||
(false-if-exception (delete-file root))
|
||||
(symlink source root)
|
||||
(add-indirect-root store root)
|
||||
|
||||
(format #t "source code for commit ~a: ~a (GC root: ~a)~%"
|
||||
commit source root)))))
|
||||
((commit)
|
||||
;; Automatically deduce the version and revision numbers.
|
||||
(main commit #f))))
|
||||
|
|
Loading…
Reference in a new issue