aboutsummaryrefslogtreecommitdiff
path: root/guix/ui.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-04-21 22:40:23 +0200
committerLudovic Courtès <ludo@gnu.org>2013-04-21 22:40:40 +0200
commit861693f3e71fed8663a3ef9c336c3f3345e1e039 (patch)
tree5f798b6915114f4658bcbd764ada7a84e4fd6238 /guix/ui.scm
parent6c365eca6dafca37f0ac34d55221bcf197df49a3 (diff)
downloadgnu-guix-861693f3e71fed8663a3ef9c336c3f3345e1e039.tar
gnu-guix-861693f3e71fed8663a3ef9c336c3f3345e1e039.tar.gz
Factorize `download-and-store'.
* guix/download.scm (download-to-store): New procedure. * guix/scripts/download.scm (fetch-and-store): Remove. (guix-download): Use `download-to-store' instead. * guix/ui.scm (call-with-temporary-output-file): Move to... * guix/utils.scm (call-with-temporary-output-file): ... here.
Diffstat (limited to 'guix/ui.scm')
-rw-r--r--guix/ui.scm16
1 files changed, 0 insertions, 16 deletions
diff --git a/guix/ui.scm b/guix/ui.scm
index 778711be92..9ea2f02ce2 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -41,7 +41,6 @@
with-error-handling
read/eval-package-expression
location->string
- call-with-temporary-output-file
switch-symlinks
config-directory
fill-paragraph
@@ -205,21 +204,6 @@ available for download."
(($ <location> file line column)
(format #f "~a:~a:~a" file line column))))
-(define (call-with-temporary-output-file proc)
- "Call PROC with a name of a temporary file and open output port to that
-file; close the file and delete it when leaving the dynamic extent of this
-call."
- (let* ((template (string-copy "guix-file.XXXXXX"))
- (out (mkstemp! template)))
- (dynamic-wind
- (lambda ()
- #t)
- (lambda ()
- (proc template out))
- (lambda ()
- (false-if-exception (close out))
- (false-if-exception (delete-file template))))))
-
(define (switch-symlinks link target)
"Atomically switch LINK, a symbolic link, to point to TARGET. Works
both when LINK already exists and when it does not."