[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#34187] [PATCH] gnu: emacs-ert-runner: Fix lisp directory warning.
From: |
Ludovic Courtès |
Subject: |
[bug#34187] [PATCH] gnu: emacs-ert-runner: Fix lisp directory warning. |
Date: |
Tue, 29 Jan 2019 23:36:57 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Hello,
Maxim Cournoyer <address@hidden> skribis:
>>From 532f0dfeaa5f9aa7c03916afc843d5556a12f53c Mon Sep 17 00:00:00 2001
> From: Maxim Cournoyer <address@hidden>
> Date: Tue, 22 Jan 2019 05:33:19 +0000
> Subject: [PATCH] gnu: emacs-ert-runner: Fix lisp directory warning.
>
> This fixes the warning message such as: "Warning: Lisp directory
> '/tmp/guix-build-emacs-ert-runner-0.7.0-1.90b8fdd.drv-0/source': No such file
> or directory" that would be printed upon running ert-runner.
>
> * gnu/packages/emacs-xyz.scm (emacs-ert-runner)[modules]: Add (srfi srfi-1) to
> the list of used modules.
> [phases]{install-executable}: Compute SOURCE-DRV and filter it out from the
> paths composing the EMACSLOADPATH variable used in the wrapper.
Good catch!
> (wrap-program (string-append out "/bin/ert-runner")
> (list "EMACSLOADPATH" ":" 'prefix
> - (string-split (getenv "EMACSLOADPATH") #\:)))
> + ;; Do not capture the transient source directory in
> + ;; the wrapper.
> + (remove (lambda (p)
> + (string=? p source-drv))
> + (string-split (getenv "EMACSLOADPATH")
> #\:))))
Or simply: (delete source-drv (string-split (getenv "EMACSLOADPATH") #\:))).
> + (source-drv (string-append
> + "/tmp/guix-build-" ,name "-" ,version
> + ".drv-0/source")))
Actually ‘source-drv’ is misleading because it’s not a derivation. How
about ‘source’, ‘source-directory’, or something like that?
Instead of hardcoding /tmp/guix-build-*, you could just use (getcwd), if
I’m not mistaken.
OK with changes along these lines, thanks!
Ludo’.