[gnome-build-meta] sdk/dconf: add patch for overriding dconf directory
- From: Jordan Petridis <jpetridis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-build-meta] sdk/dconf: add patch for overriding dconf directory
- Date: Tue, 16 Oct 2018 16:19:56 +0000 (UTC)
commit b9e2732077db1f84066cc04d870d152b30b95d56
Author: Abderrahim Kitouni <a kitouni gmail com>
Date: Tue Sep 18 13:34:22 2018 +0100
sdk/dconf: add patch for overriding dconf directory
Should hopefully fix #58
(Cherry-picked from 9bb2f49063f93829b38f769e892fc1a012b7e874)
elements/sdk/dconf.bst | 2 ++
files/dconf/dconf-override.patch | 23 +++++++++++++++++++++++
2 files changed, 25 insertions(+)
---
diff --git a/elements/sdk/dconf.bst b/elements/sdk/dconf.bst
index f631994..0fbf311 100644
--- a/elements/sdk/dconf.bst
+++ b/elements/sdk/dconf.bst
@@ -3,6 +3,8 @@ sources:
- kind: git
url: gitlab_gnome_org:GNOME/dconf
track: master
+- kind: patch
+ path: files/dconf/dconf-override.patch
depends:
- sdk/glib.bst
- filename: sdk/vala.bst
diff --git a/files/dconf/dconf-override.patch b/files/dconf/dconf-override.patch
new file mode 100644
index 0000000..0e95c22
--- /dev/null
+++ b/files/dconf/dconf-override.patch
@@ -0,0 +1,23 @@
+diff --git a/engine/dconf-engine-source-user.c b/engine/dconf-engine-source-user.c
+index 1657875..e4f8786 100644
+--- a/engine/dconf-engine-source-user.c
++++ b/engine/dconf-engine-source-user.c
+@@ -39,11 +39,17 @@ dconf_engine_source_user_open_gvdb (const gchar *name)
+ {
+ GvdbTable *table;
+ gchar *filename;
++ const gchar *override;
++
++ override = g_getenv ("DCONF_USER_CONFIG_DIR");
++ if (override == NULL)
++ filename = g_build_filename (g_get_user_config_dir (), "dconf", name, NULL);
++ else
++ filename = g_build_filename (g_get_home_dir (), override, name, NULL);
+
+ /* This can fail in the normal case of the user not having any
+ * settings. That's OK and it shouldn't be considered as an error.
+ */
+- filename = g_build_filename (g_get_user_config_dir (), "dconf", name, NULL);
+ table = gvdb_table_new (filename, FALSE, NULL);
+ g_free (filename);
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]