lilypond-devel
[Top][All Lists]
Advanced

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

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


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

Reviewers: dak,

Message:
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:
relocate.cc: 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
standard
fontconfig setup includes font files like `~/.fonts' or `/usr/share',
which
obviously must not be used.  Up to now, the `fontconfig.reloc' file in
gub
uses the `set' relocation command, which doesn't allow gub to replace
the
fontconfig configuration file with a temporary alternative while
building
test files or documentation.  Future changes in gub will use `set?'
instead.

Please review this at https://codereview.appspot.com/345160043/

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


Index: lily/relocate.cc
diff --git a/lily/relocate.cc b/lily/relocate.cc
index 879377a1cc0928bae14c6fd92c5fd8f032eacac2..02776ff414b382e2f712e53c1b1bce05b0a701aa 100644
--- a/lily/relocate.cc
+++ b/lily/relocate.cc
@@ -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]