emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#34118: closed ([PATCH] guix: Add guard to texlive-


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#34118: closed ([PATCH] guix: Add guard to texlive-configuration profile hook.)
Date: Fri, 18 Jan 2019 16:20:02 +0000

Your message dated Fri, 18 Jan 2019 16:19:11 +0000
with message-id <address@hidden>
and subject line Re: [bug#34118] [PATCH] guix: Add guard to 
texlive-configuration profile hook.
has caused the debbugs.gnu.org bug report #34118,
regarding [PATCH] guix: Add guard to texlive-configuration profile hook.
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
34118: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34118
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH] guix: Add guard to texlive-configuration profile hook. Date: Thu, 17 Jan 2019 21:02:17 +0000
It is possible to generate a profile where this hook will crash, as the
texmf.cnf file does not exist to be patched by substitute*. A simple example
is the profile just containing texlive-fonts-txfonts.

* guix/profiles.scm (texlive-configuration): Check that the texmf.cnf file
exists before trying to change it.
---
 guix/profiles.scm | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/guix/profiles.scm b/guix/profiles.scm
index d22539bdb2..598e0acf62 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -1363,12 +1363,15 @@ MANIFEST."
                                       (manifest-entries manifest))
                        #:create-all-directories? #t
                        #:log-port (%make-void-port "w"))
-          (substitute* (string-append #$output
-                                      "/share/texmf-dist/web2c/texmf.cnf")
-            (("^TEXMFROOT = .*")
-             (string-append "TEXMFROOT = " #$output "/share\n"))
-            (("^TEXMF = .*")
-             "TEXMF = $TEXMFROOT/share/texmf-dist\n"))
+          (let ((texmf.cnf (string-append
+                            #$output
+                            "/share/texmf-dist/web2c/texmf.cnf")))
+            (when (file-exists? texmf.cnf)
+              (substitute* texmf.cnf
+                (("^TEXMFROOT = .*")
+                 (string-append "TEXMFROOT = " #$output "/share\n"))
+                (("^TEXMF = .*")
+                 "TEXMF = $TEXMFROOT/share/texmf-dist\n"))))
           #t)))
 
     (with-monad %store-monad
-- 
2.20.1




--- End Message ---
--- Begin Message --- Subject: Re: [bug#34118] [PATCH] guix: Add guard to texlive-configuration profile hook. Date: Fri, 18 Jan 2019 16:19:11 +0000 User-agent: mu4e 1.0; emacs 26.1
Ludovic Courtès <address@hidden> writes:

> Hello,
>
> Christopher Baines <address@hidden> skribis:
>
>> It is possible to generate a profile where this hook will crash, as the
>> texmf.cnf file does not exist to be patched by substitute*. A simple example
>> is the profile just containing texlive-fonts-txfonts.
>>
>> * guix/profiles.scm (texlive-configuration): Check that the texmf.cnf file
>> exists before trying to change it.
>
> LGTM, thanks!

Great, I've pushed this to master now.

Attachment: signature.asc
Description: PGP signature


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]