[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Introduce new command `set?'. (issue 345160043 by addre

From: lemzwerg
Subject: Re: Introduce new command `set?'. (issue 345160043 by address@hidden)
Date: Fri, 21 Dec 2018 09:47:26 -0800

Reviewers: dak,

Where/how is that being used?  Wouldn't this want documenting?

It's nowhere documented, which pretty nicely describes the state of gub
in total...  This feature gets only activated if you configure with
`--enable-relocation` (which you normally won't do).

I will document this central part of gub builds later on, together with
the other relocation commands.

Description: Introduce new command `set?'.

Contrary to `set', `set?' won't override environment variables that are
already set.

We need this for reproducable builds, in particular with gub: The
fontconfig setup includes font files like `~/.fonts' or `/usr/share',
obviously must not be used.  Up to now, the `fontconfig.reloc' file in
uses the `set' relocation command, which doesn't allow gub to replace
fontconfig configuration file with a temporary alternative while
test files or documentation.  Future changes in gub will use `set?'

Please review this at

Affected files (+4, -0 lines):
  M lily/

Index: lily/
diff --git a/lily/ b/lily/
index 879377a1cc0928bae14c6fd92c5fd8f032eacac2..02776ff414b382e2f712e53c1b1bce05b0a701aa 100644
--- a/lily/
+++ b/lily/
@@ -63,6 +63,8 @@ sane_putenv (char const *key, const string &value, bool overwrite)
       return retval;
+  else
+    debug_output (_f ("%s not overwritten\n", key));

   return -1;
@@ -371,6 +373,8 @@ read_relocation_file (const string &filename)

       if (command == "set")
         sane_putenv (variable.c_str (), value, true);
+      if (command == "set?")
+        sane_putenv (variable.c_str (), value, false);
       else if (command == "setdir")
         set_env_dir (variable.c_str (), value);
       else if (command == "setfile")

reply via email to

[Prev in Thread] Current Thread [Next in Thread]