summaryrefslogtreecommitdiff
path: root/guix/profiles.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/profiles.scm')
-rw-r--r--guix/profiles.scm15
1 files changed, 11 insertions, 4 deletions
diff --git a/guix/profiles.scm b/guix/profiles.scm
index c1c6281eb0..0044851dc2 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -1712,11 +1712,18 @@ MANIFEST."
(setenv "TEXMF" (string-append #$output "/share/texmf-dist"))
;; Remove invalid maps from config file.
- (let ((web2c (string-append #$output "/share/texmf-config/web2c/"))
- (maproot (string-append #$output "/share/texmf-dist/fonts/map/")))
+ (let* ((web2c (string-append #$output "/share/texmf-config/web2c/"))
+ (maproot (string-append #$output "/share/texmf-dist/fonts/map/"))
+ (updmap.cfg (string-append web2c "updmap.cfg")))
(mkdir-p web2c)
- (copy-file #$updmap.cfg (string-append web2c "updmap.cfg"))
- (make-file-writable (string-append web2c "updmap.cfg"))
+
+ ;; Some profiles may already have this file, which prevents us
+ ;; from copying it. Since we need to generate it from scratch
+ ;; anyway, we delete it here.
+ (when (file-exists? updmap.cfg)
+ (delete-file updmap.cfg))
+ (copy-file #$updmap.cfg updmap.cfg)
+ (make-file-writable updmap.cfg)
(let* ((port (open-pipe* OPEN_WRITE
#$(file-append texlive-bin "/bin/updmap-sys")
"--syncwithtrees"