all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>, Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: master fails to build on FreeBSD when ACL support is on
Date: Fri, 19 Jan 2018 14:42:40 -0800	[thread overview]
Message-ID: <9dd64b10-78ce-c561-8c51-9e15b11e102c@cs.ucla.edu> (raw)
In-Reply-To: <jwvmv19a864.fsf-monnier+Inbox@gnu.org>

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

On 01/19/2018 12:53 PM, Stefan Monnier wrote:
> which seems to me to be the result of an oversight: the original coder
> probably didn't realize that such a call would either create the temp
> file in the same directory as target-file or under /tmp depending on
> whether target-file is relative or absolute.

Right you are. (The "original coder" was me; sorry about that.) Since I 
broke it, I fixed it by installing the attached into emacs-26.


[-- Attachment #2: 0001-Fix-tempfile-creation-when-byte-compiling.patch --]
[-- Type: text/x-patch, Size: 1856 bytes --]

From 1772f38eb1b51713c363d81215bfebba97c601d5 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Fri, 19 Jan 2018 14:37:31 -0800
Subject: [PATCH] Fix tempfile creation when byte compiling

This improves on the recent fix for master failing to build
on FreeBSD.  Suggested by Stefan Monnier in:
https://lists.gnu.org/r/emacs-devel/2018-01/msg00600.html
* lisp/emacs-lisp/bytecomp.el (byte-compile-file):
Put tempfile next to the target file, as was the original intent.
---
 lisp/emacs-lisp/bytecomp.el | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 700a7c16b5..f6d259ba9d 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1933,17 +1933,7 @@ byte-compile-file
 		       ;; parallel bootstrap), it does not risk getting a
 		       ;; half-finished file.  (Bug#4196)
 		       (tempfile
-                        (if (file-name-absolute-p target-file)
-                            (make-temp-file target-file)
-                          ;; If target-file is relative and includes
-                          ;; leading directories, make-temp-file will
-                          ;; assume those leading directories exist
-                          ;; under temporary-file-directory, which might
-                          ;; not be true.  So strip leading directories
-                          ;; from relative file names before calling
-                          ;; make-temp-file.
-                          (make-temp-file
-                           (file-name-nondirectory target-file))))
+			(make-temp-file (expand-file-name target-file)))
 		       (default-modes (default-file-modes))
 		       (temp-modes (logand default-modes #o600))
 		       (desired-modes (logand default-modes #o666))
-- 
2.14.3


  parent reply	other threads:[~2018-01-19 22:42 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-16  4:20 master fails to build on FreeBSD when ACL support is on Joseph Mingrone
2018-01-16 17:06 ` Paul Eggert
2018-01-16 18:16 ` Eli Zaretskii
2018-01-18 23:40   ` Joseph Mingrone
2018-01-19 14:45     ` Eli Zaretskii
2018-01-19 14:59       ` Joseph Mingrone
2018-01-19 15:33         ` Eli Zaretskii
2018-01-19 16:38       ` Stefan Monnier
2018-01-19 18:45         ` Eli Zaretskii
2018-01-19 20:53           ` Stefan Monnier
2018-01-19 21:17             ` Glenn Morris
2018-01-21  1:04               ` Glenn Morris
2018-01-21  3:42                 ` Paul Eggert
2018-11-14 23:12                 ` Glenn Morris
2018-11-15  1:23                   ` Paul Eggert
2018-11-15 14:48                     ` Eli Zaretskii
2018-01-19 22:42             ` Paul Eggert [this message]
2018-01-20  7:52               ` Michael Albinus
2018-01-21  3:49                 ` Paul Eggert
2018-01-21 12:14                   ` Michael Albinus
2018-01-20  7:57               ` Eli Zaretskii
2018-01-20 20:47                 ` Joseph Mingrone
2018-01-20 23:35                   ` Joseph Mingrone
2018-01-21  3:41                     ` Paul Eggert
2018-01-21  3:50                       ` Stefan Monnier
2018-01-22  6:42                         ` Paul Eggert
2018-01-22 14:11                           ` Stefan Monnier
2018-01-21 15:53                       ` Eli Zaretskii
2018-01-22  6:52                         ` Paul Eggert
2018-01-22 15:52                           ` Eli Zaretskii
2018-01-22 17:02                             ` Paul Eggert
2018-01-22 17:41                               ` Eli Zaretskii
2018-01-22 18:50                                 ` Paul Eggert
2018-01-22 20:32                                   ` Eli Zaretskii
2018-01-23  0:47                                     ` Paul Eggert
2018-01-21 15:56                   ` Eli Zaretskii
2018-01-21 16:22                     ` Joseph Mingrone
2018-01-20  7:46             ` Eli Zaretskii
2018-01-17 18:33 ` Ashish SHUKLA
2018-01-17 18:53   ` Joseph Mingrone

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=9dd64b10-78ce-c561-8c51-9e15b11e102c@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /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.