[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#48578: 28.0.50; Native-compiled files of some preloaded files not lo
From: |
Eli Zaretskii |
Subject: |
bug#48578: 28.0.50; Native-compiled files of some preloaded files not loaded at dump time |
Date: |
Wed, 26 May 2021 16:43:20 +0300 |
> From: Andrea Corallo <akrl@sdf.org>
> Cc: Eli Zaretskii <eliz@gnu.org>, 48578@debbugs.gnu.org
> Date: Tue, 25 May 2021 13:22:39 +0000
>
> diff --git a/src/comp.c b/src/comp.c
> index 340ed85038..8e40ea0f25 100644
> --- a/src/comp.c
> +++ b/src/comp.c
> @@ -4008,15 +4008,15 @@ DEFUN ("comp-el-to-eln-rel-filename",
> Fcomp_el_to_eln_rel_filename,
> {
> CHECK_STRING (filename);
>
> - /* Use `file-truename' or fall back to `expand-file-name' when the
> - first is not available (bug#44701).
> -
> - `file-truename' is not available only for a short phases of the
> - bootstrap before file.el is loaded, given we do not symlink
> - inside the build directory this should work. */
> - filename = NILP (Ffboundp (intern_c_string ("file-truename")))
> - ? Fexpand_file_name (filename, Qnil)
> - : CALL1I (file-truename, filename);
> + /* `file-truename' is not available only during bootstrap before
> + file.el is loaded. */
> +#ifndef WINDOWSNT
> + char *file_normalized = realpath (SSDATA (filename), NULL);
> +#else
> + char *file_normalized = ??? ;
> +#endif
> + filename = Fexpand_file_name (build_string (file_normalized), Qnil);
> + xfree (file_normalized);
>
> if (NILP (Ffile_exists_p (filename)))
> xsignal1 (Qfile_missing, filename);
Thanks, this works. But I have a few questions/comments:
. why do you use Fexpand_file_name _after_ realpath? shouldn't we
call it before realpath instead?
. we need to encode the file name before passing it to realpath, and
decode the result, right?
. realpath could potentially return NULL, and we should check for
that, and return the result of Fexpand_file_name if it does
. we don't need to support remote files here via file-handlers,
right?
If you agree with the above, I will prepare a proper patch and install
it, including the necessary changes for WINDOWSNT.
- bug#48578: 28.0.50; Native-compiled files of some preloaded files not loaded at dump time, (continued)
- bug#48578: 28.0.50; Native-compiled files of some preloaded files not loaded at dump time, Andrea Corallo, 2021/05/24
- bug#48578: 28.0.50; Native-compiled files of some preloaded files not loaded at dump time, Eli Zaretskii, 2021/05/24
- bug#48578: 28.0.50; Native-compiled files of some preloaded files not loaded at dump time, Andrea Corallo, 2021/05/24
- bug#48578: 28.0.50; Native-compiled files of some preloaded files not loaded at dump time, Eli Zaretskii, 2021/05/24
- bug#48578: 28.0.50; Native-compiled files of some preloaded files not loaded at dump time, Andrea Corallo, 2021/05/24
- bug#48578: 28.0.50; Native-compiled files of some preloaded files not loaded at dump time, Eli Zaretskii, 2021/05/24
- bug#48578: 28.0.50; Native-compiled files of some preloaded files not loaded at dump time, Andrea Corallo, 2021/05/25
- bug#48578: 28.0.50; Native-compiled files of some preloaded files not loaded at dump time, Eli Zaretskii, 2021/05/25
- bug#48578: 28.0.50; Native-compiled files of some preloaded files not loaded at dump time, Andrea Corallo, 2021/05/25
- bug#48578: 28.0.50; Native-compiled files of some preloaded files not loaded at dump time, Andrea Corallo, 2021/05/25
- bug#48578: 28.0.50; Native-compiled files of some preloaded files not loaded at dump time,
Eli Zaretskii <=
- bug#48578: 28.0.50; Native-compiled files of some preloaded files not loaded at dump time, Andrea Corallo, 2021/05/27
- bug#48578: 28.0.50; Native-compiled files of some preloaded files not loaded at dump time, Eli Zaretskii, 2021/05/27
- bug#48578: 28.0.50; Native-compiled files of some preloaded files not loaded at dump time, Andrea Corallo, 2021/05/29
- bug#48578: 28.0.50; Native-compiled files of some preloaded files not loaded at dump time, Eli Zaretskii, 2021/05/29
- bug#48578: 28.0.50; Native-compiled files of some preloaded files not loaded at dump time, Basil L. Contovounesios, 2021/05/25
- bug#48578: 28.0.50; Native-compiled files of some preloaded files not loaded at dump time, Eli Zaretskii, 2021/05/25
- bug#48578: 28.0.50; Native-compiled files of some preloaded files not loaded at dump time, Basil L. Contovounesios, 2021/05/25