me
/
guix
Archived
1
0
Fork 0

profiles: texlive-configuration: Handle updmap.cfg conflict.

The profile hook would fail when preparing an environment for a package using
texlive-union, because the union already had a updmap.cfg file.

Reported-by: Lars-Dominik Braun <ldb@leibniz-psychology.org>.

* guix/profiles.scm (texlive-configuration): Delete updmap.cfg if it exists.
master
Ricardo Wurmus 2021-05-05 14:47:53 +02:00
parent 0f116d7f90
commit 56e4d7204b
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
1 changed files with 11 additions and 4 deletions

View File

@ -1712,11 +1712,18 @@ MANIFEST."
(setenv "TEXMF" (string-append #$output "/share/texmf-dist")) (setenv "TEXMF" (string-append #$output "/share/texmf-dist"))
;; Remove invalid maps from config file. ;; Remove invalid maps from config file.
(let ((web2c (string-append #$output "/share/texmf-config/web2c/")) (let* ((web2c (string-append #$output "/share/texmf-config/web2c/"))
(maproot (string-append #$output "/share/texmf-dist/fonts/map/"))) (maproot (string-append #$output "/share/texmf-dist/fonts/map/"))
(updmap.cfg (string-append web2c "updmap.cfg")))
(mkdir-p web2c) (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 (let* ((port (open-pipe* OPEN_WRITE
#$(file-append texlive-bin "/bin/updmap-sys") #$(file-append texlive-bin "/bin/updmap-sys")
"--syncwithtrees" "--syncwithtrees"