GNU bug report logs - #34448
--no-build-details means system-name is nil

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Tue, 12 Feb 2019 01:55:01 UTC

Severity: minor

Tags: confirmed, fixed

Found in version 27.0.50

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 34448 <at> debbugs.gnu.org
Subject: bug#34448: --no-build-details means system-name is nil
Date: Thu, 10 Oct 2019 00:26:53 +0200
Glenn Morris <rgm <at> 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




This bug report was last modified 5 years and 223 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.