guix-commits
[Top][All Lists]
Advanced

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

02/02: build-systems/emacs: No longer skip patching of files containing


From: guix-commits
Subject: 02/02: build-systems/emacs: No longer skip patching of files containing NULs.
Date: Fri, 8 Jan 2021 14:11:07 -0500 (EST)

apteryx pushed a commit to branch core-updates
in repository guix.

commit 0715793373059951e79bf94c92a4c75f547752d6
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Fri Jan 8 09:02:05 2021 -0500

    build-systems/emacs: No longer skip patching of files containing NULs.
    
    This follows the fix to <https://bugs.gnu.org/30116>.
    
    * guix/build/emacs-build-system.scm (patch-el-files)
    [file-contains-nul-char]: Remove nested procedure.
    [el-file]: Do no filter out files containing NUL characters.
---
 guix/build/emacs-build-system.scm | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/guix/build/emacs-build-system.scm 
b/guix/build/emacs-build-system.scm
index 26ea59b..79a1a42 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -105,23 +105,9 @@ environment variable\n" source-directory)))
   "Substitute the absolute \"/bin/\" directory with the right location in the
 store in '.el' files."
 
-  (define (file-contains-nul-char? file)
-    (call-with-input-file file
-      (lambda (in)
-        (let loop ((line (read-line in 'concat)))
-          (cond
-           ((eof-object? line) #f)
-           ((string-index line #\nul) #t)
-           (else (loop (read-line in 'concat))))))
-      #:binary #t))
-
   (let* ((out (assoc-ref outputs "out"))
          (site-lisp (string-append out %install-dir))
-         ;; (ice-9 regex) uses libc's regexp routines, which cannot deal with
-         ;; strings containing NULs.  Filter out such files.  TODO: Remove
-         ;; this workaround when <https://bugs.gnu.org/30116> is fixed.
-         (el-files (remove file-contains-nul-char?
-                           (find-files (getcwd) "\\.el$"))))
+         (el-files (find-files (getcwd) "\\.el$")))
     (define (substitute-program-names)
       (substitute* el-files
         (("\"/bin/([^.]\\S*)\"" _ cmd-name)



reply via email to

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