unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob e4ef6f2d3318e3718f42009630950c2dc9faeb94 1006 bytes (raw)
name: packages/patches/geoclue-config.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 
Allow the configuration file to be specified via an environment variable.

diff --git a/src/gclue-config.c b/src/gclue-config.c
index 7ab2a67..e41f3df 100644
--- a/src/gclue-config.c
+++ b/src/gclue-config.c
@@ -332,6 +332,11 @@ static void
 gclue_config_init (GClueConfig *config)
 {
         GError *error = NULL;
+	const char *config_file_path;
+
+	config_file_path = g_getenv ("GEOCLUE_CONFIG_FILE");
+	if (!config_file_path)
+            config_file_path = CONFIG_FILE_PATH;
 
         config->priv = gclue_config_get_instance_private(config);
         config->priv->key_file = g_key_file_new ();
@@ -341,7 +346,7 @@ gclue_config_init (GClueConfig *config)
                                    &error);
         if (error != NULL) {
                 g_critical ("Failed to load configuration file '%s': %s",
-                            CONFIG_FILE_PATH, error->message);
+                            config_file_path, error->message);
                 g_error_free (error);
 
                 return;

debug log:

solving e4ef6f2d3318e3718f42009630950c2dc9faeb94 ...
found e4ef6f2d3318e3718f42009630950c2dc9faeb94 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

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

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