summaryrefslogtreecommitdiff
path: root/guix/ui.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-10-26 22:17:25 +0100
committerLudovic Courtès <ludo@gnu.org>2015-10-27 00:01:20 +0100
commit3bb168b0997d2ba2ef15e8eef2890582c8a6df9c (patch)
treeeb401c746e776bf079764502d7721043f44793de /guix/ui.scm
parent65797bfffd1b4d9126f11ffb6b59a1a7a18d48f0 (diff)
downloadguix-patches-3bb168b0997d2ba2ef15e8eef2890582c8a6df9c.tar
guix-patches-3bb168b0997d2ba2ef15e8eef2890582c8a6df9c.tar.gz
utils: Add 'switch-symlinks', moved from (guix ui).
* guix/ui.scm (switch-symlinks): Move to... * guix/utils.scm: ... here. New procedure. * guix/scripts/pull.scm: Use it.
Diffstat (limited to 'guix/ui.scm')
-rw-r--r--guix/ui.scm8
1 files changed, 0 insertions, 8 deletions
diff --git a/guix/ui.scm b/guix/ui.scm
index c45c50fa16..b7ed5e7d4d 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -73,7 +73,6 @@
read/eval
read/eval-package-expression
location->string
- switch-symlinks
config-directory
fill-paragraph
texi->plain-text
@@ -715,13 +714,6 @@ replacement if PORT is not Unicode-capable."
(($ <location> file line column)
(format #f "~a:~a:~a" file line column))))
-(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."
- (let ((pivot (string-append link ".new")))
- (symlink target pivot)
- (rename-file pivot link)))
-
(define (config-directory)
"Return the name of the configuration directory, after making sure that it
exists. Honor the XDG specs,