From 9132b9bd72304e6fe659b3cb31700bdc49696caf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 9 Apr 2014 23:01:02 +0200 Subject: [PATCH] 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 at . --- guix/nar.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guix/nar.scm b/guix/nar.scm index 5b602df90b..ce69163a8a 100644 --- a/guix/nar.scm +++ b/guix/nar.scm @@ -339,8 +339,10 @@ protected from garbage collection." (let* ((template (string-append (%store-prefix) "/guix-XXXXXX")) (port (mkstemp! template))) (close-port port) + + ;; Make sure TEMPLATE is not collected while we populate it. (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 ;; again if that happens.