GNU bug report logs -
#48578
28.0.50; Native-compiled files of some preloaded files not loaded at dump time
Previous Next
Reported by: Eli Zaretskii <eliz <at> gnu.org>
Date: Sat, 22 May 2021 07:21:01 UTC
Severity: normal
Found in version 28.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Andrea Corallo <akrl <at> sdf.org>
>> Cc: 48578 <at> debbugs.gnu.org
>> Date: Tue, 25 May 2021 12:34:27 +0000
>>
>> + /* Use `file-truename' or fall back to 'realpath' `expand-file-name'
>> + when the first is not available. (`file-truename' is not
>> + available only for a short phases of the bootstrap before file.el
>> + is loaded). */
>> +
>> + if (NILP (Ffboundp (intern_c_string ("file-truename"))))
>> + {
>> +#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);
>> + }
>> + else
>> + filename = CALL1I (file-truename, filename);
>>
>> if (NILP (Ffile_exists_p (filename)))
>> xsignal1 (Qfile_missing, filename);
>
> Thanks, I will try that. But why not use realpath at all times, even
> if file-truename is available? They do the same thing, AFAIK, no?
AFAIK yes but the file-truename implementation didn't look sufficiently
trivial to be sure they are really equivalent with the quick skim I had.
I agree with the idea of using always one (realpath), should be also
easier to ideantify issues in case.
Attached the updated patch.
Andrea
[48578.patch (text/x-diff, inline)]
diff --git a/src/comp.c b/src/comp.c
index 340ed85038..e961161fc6 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -4008,15 +4008,18 @@ 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);
+ /* Use `file-truename' or fall back to 'realpath' `expand-file-name'
+ when the first is not available. (`file-truename' is not
+ available only for a short phases of the 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);
This bug report was last modified 3 years and 355 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.