unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#34448: --no-build-details means system-name is nil
@ 2019-02-12  1:54 Glenn Morris
  2019-10-09 22:26 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2019-02-12  1:54 UTC (permalink / raw)
  To: 34448

Package: emacs
Version: 27.0.50
Severity: minor

Master at revision 2860f6cec5. If I run

emacs -Q --no-build-details

then (system-name) returns nil. I expect this switch to only affect the
values stored in the Emacs binary, not the run-time result.

I'm also not sure why --no-build-details is a run-time option (as
opposed to a build-time one).

Anyway, this breaks file-locking (cf bug#34355) and makes it impossible
to save a file.






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

* bug#34448: --no-build-details means system-name is nil
  2019-02-12  1:54 bug#34448: --no-build-details means system-name is nil Glenn Morris
@ 2019-10-09 22:26 ` Lars Ingebrigtsen
  2019-10-10  7:39   ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-09 22:26 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 34448

Glenn Morris <rgm@gnu.org> writes:

> emacs -Q --no-build-details
>
> then (system-name) returns nil. I expect this switch to only affect the
> values stored in the Emacs binary, not the run-time result.

Yup.  It seems like this was the intention here:

void
init_system_name (void)
{
  if (!build_details)
    {
      /* Set system-name to nil so that the build is deterministic.  */
      Vsystem_name = Qnil;
      return;
    }

which is called from

static void
init_and_cache_system_name (void)
{
  init_system_name ();
  cached_system_name = Vsystem_name;
}

which is called from

DEFUN ("system-name", Fsystem_name, Ssystem_name, 0, 0, 0,
       doc: /* Return the host name of the machine you are running on, as a string.  */)
  (void)
{
  if (EQ (Vsystem_name, cached_system_name))
    init_and_cache_system_name ();
  return Vsystem_name;

Is --no-build-details just meant to be used during builds?  If so, we
can just document that, I guess?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#34448: --no-build-details means system-name is nil
  2019-10-09 22:26 ` Lars Ingebrigtsen
@ 2019-10-10  7:39   ` Eli Zaretskii
  2019-10-11  7:05     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2019-10-10  7:39 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 34448

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Thu, 10 Oct 2019 00:26:53 +0200
> Cc: 34448@debbugs.gnu.org
> 
> void
> init_system_name (void)
> {
>   if (!build_details)
>     {
>       /* Set system-name to nil so that the build is deterministic.  */
>       Vsystem_name = Qnil;
>       return;
>     }
> 
> which is called from
> 
> static void
> init_and_cache_system_name (void)
> {
>   init_system_name ();
>   cached_system_name = Vsystem_name;
> }
> 
> which is called from
> 
> DEFUN ("system-name", Fsystem_name, Ssystem_name, 0, 0, 0,
>        doc: /* Return the host name of the machine you are running on, as a string.  */)
>   (void)
> {
>   if (EQ (Vsystem_name, cached_system_name))
>     init_and_cache_system_name ();
>   return Vsystem_name;
> 
> Is --no-build-details just meant to be used during builds?  If so, we
> can just document that, I guess?

Yes, documenting that would be a good compromise, I think.





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

* bug#34448: --no-build-details means system-name is nil
  2019-10-10  7:39   ` Eli Zaretskii
@ 2019-10-11  7:05     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-11  7:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 34448

Eli Zaretskii <eliz@gnu.org> writes:

>> Is --no-build-details just meant to be used during builds?  If so, we
>> can just document that, I guess?
>
> Yes, documenting that would be a good compromise, I think.

I've now done this, and I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2019-10-11  7:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-12  1:54 bug#34448: --no-build-details means system-name is nil Glenn Morris
2019-10-09 22:26 ` Lars Ingebrigtsen
2019-10-10  7:39   ` Eli Zaretskii
2019-10-11  7:05     ` Lars Ingebrigtsen

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

	https://git.savannah.gnu.org/cgit/emacs.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).