nar: 'restore-file-set' registers the temporary result as a GC root.
* guix/nar.scm (temporary-store-directory): Use 'add-indirect-root', not 'add-temp-root'. Reported by Andreas Enge <andreas@enge.fr> at <https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00161.html>.
This commit is contained in:
parent
9bf404e9e6
commit
9132b9bd72
|
@ -339,8 +339,10 @@ protected from garbage collection."
|
||||||
(let* ((template (string-append (%store-prefix) "/guix-XXXXXX"))
|
(let* ((template (string-append (%store-prefix) "/guix-XXXXXX"))
|
||||||
(port (mkstemp! template)))
|
(port (mkstemp! template)))
|
||||||
(close-port port)
|
(close-port port)
|
||||||
|
|
||||||
|
;; Make sure TEMPLATE is not collected while we populate it.
|
||||||
(with-store store
|
(with-store store
|
||||||
(add-temp-root store template))
|
(add-indirect-root store template))
|
||||||
|
|
||||||
;; There's a small window during which the GC could delete the file. Try
|
;; There's a small window during which the GC could delete the file. Try
|
||||||
;; again if that happens.
|
;; again if that happens.
|
||||||
|
|
Loading…
Reference in New Issue