all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: 20330@debbugs.gnu.org
Subject: bug#20330: Do not capture build-time $PATH in 'emacs' binary
Date: Tue, 14 Apr 2015 13:51:35 +0200	[thread overview]
Message-ID: <87twwjexmg.fsf@gnu.org> (raw)

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

The attached patch makes sure that the ‘emacs’ executable does not
capture the value of the build-time $PATH (which notably includes the
build directory, which may or may not exist afterwards.)

(FWIW, the added motivation in the context of Guix and Nix is that the
garbage collector would see those references and assume that Emacs needs
all these items at run time.  See
<http://git.savannah.gnu.org/cgit/guix.git/commit/?id=1bef37ee2e0a6ba9048eb8087651c8dbd2c6c796>.)

Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 489 bytes --]

--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -64,6 +64,11 @@
                           (expand-file-name "textmodes" dir)
                           (expand-file-name "vc" dir)))))
 
+;; Reset 'exec-path' so we don't capture the build-time $PATH in the
+;; 'emacs' executable.
+(setq-default exec-path nil)
+(setq exec-path nil)
+
 (if (eq t purify-flag)
     ;; Hash consing saved around 11% of pure space in my tests.
     (setq purify-flag (make-hash-table :test 'equal :size 70000)))

             reply	other threads:[~2015-04-14 11:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-14 11:51 Ludovic Courtès [this message]
2015-04-14 14:39 ` bug#20330: Do not capture build-time $PATH in 'emacs' binary Eli Zaretskii
2015-04-14 16:10   ` Ludovic Courtès
2015-04-14 16:38     ` Eli Zaretskii
2015-04-15  7:45       ` Ludovic Courtès
2015-04-15 16:12         ` Eli Zaretskii
2015-04-15 16:37           ` Ludovic Courtès
2015-04-15 16:49             ` Eli Zaretskii
2015-04-15 17:07 ` Glenn Morris
2015-04-15 19:45   ` Ludovic Courtès
2015-04-16 15:37     ` Glenn Morris
2015-04-16 15:49       ` Eli Zaretskii
2015-04-16 19:25         ` Glenn Morris
2015-04-16 19:33           ` Eli Zaretskii
2015-04-20 21:48           ` Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87twwjexmg.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=20330@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.