unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#34187] [PATCH] gnu: emacs-ert-runner: Fix lisp directory warning.
@ 2019-01-24  4:35 Maxim Cournoyer
  2019-01-29 22:36 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Maxim Cournoyer @ 2019-01-24  4:35 UTC (permalink / raw)
  To: 34187

[-- Attachment #1: Type: text/plain, Size: 449 bytes --]

Hello!

This fixes an annoyance where a warning would be print every time
ert-runner was executed, like:

--8<---------------cut here---------------start------------->8---
ert-runner --version
Warning: Lisp directory '/tmp/guix-build-emacs-ert-runner-0.7.0.drv-0/ert-runner.el-0.7.0': No such file or directory
Option ‘--version‘ not available
--8<---------------cut here---------------end--------------->8---

Thank you,

Maxim


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-emacs-ert-runner-Fix-lisp-directory-warning.patch --]
[-- Type: text/x-patch, Size: 2717 bytes --]

From 532f0dfeaa5f9aa7c03916afc843d5556a12f53c Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
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.
---
 gnu/packages/emacs-xyz.scm | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index c98798c8d..7bacf4234 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -6956,11 +6956,18 @@ Emacs.")
          ("emacs-s" ,emacs-s)
          ("emacs-shut-up" ,emacs-shut-up)))
       (arguments
-       `(#:phases
+       `(#:modules ((guix build emacs-build-system)
+                    (guix build emacs-utils)
+                    (guix build utils)
+                    (srfi srfi-1))      ;for `remove'
+         #:phases
          (modify-phases %standard-phases
            (add-after 'install 'install-executable
              (lambda* (#:key inputs outputs #:allow-other-keys)
-               (let ((out (assoc-ref outputs "out")))
+               (let ((out (assoc-ref outputs "out"))
+                     (source-drv (string-append
+                                  "/tmp/guix-build-" ,name "-" ,version
+                                  ".drv-0/source")))
                  (substitute* "bin/ert-runner"
                    (("ERT_RUNNER=\"\\$\\(dirname \\$\\(dirname \\$0\\)\\)")
                     (string-append "ERT_RUNNER=\"" out
@@ -6969,7 +6976,11 @@ Emacs.")
                  (install-file "bin/ert-runner" (string-append out "/bin"))
                  (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") #\:))))
                  #t))))
          #:include (cons* "^reporters/.*\\.el$" %default-include)))
       (home-page "https://github.com/rejeep/ert-runner.el")
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-05 15:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-24  4:35 [bug#34187] [PATCH] gnu: emacs-ert-runner: Fix lisp directory warning Maxim Cournoyer
2019-01-29 22:36 ` Ludovic Courtès
2019-02-05 15:11   ` bug#34187: " Maxim Cournoyer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).