Gnome-tweaks does not look at GSETTINGS_SCHEMA_PATH or XDG_DATA_DIRS, it
assumes that schemas are installed in one global directory
(GSETTINGS_SCHEMA_DIR/gsettingsschemadir).
Guix/GuixSD uses a different directory for every gir package and has
packages pick-up files using XDG_DATA_DIRS.
Upstream ticket: https://bugzilla.gnome.org/show_bug.cgi?id=764537
janneke@gnu.org
--- gnome-tweak-3.18.1.orig/gtweak/gsettings.py 2015-04-08 15:21:32.000000000 +0200
+++ gnome-tweak-tool-3.18.1/gtweak/gsettings.py 2016-04-03 11:26:38.658482704 +0200
@@ -16,7 +16,8 @@
# along with gnome-tweak-tool. If not, see .
import logging
-import os.path
+import os
+import sys
import xml.dom.minidom
import gettext
@@ -31,6 +32,13 @@
class GSettingsMissingError(Exception):
pass
+def file_from_path(path, file_name):
+ for dir in path:
+ f = os.path.join(dir, file_name)
+ if os.path.exists(f):
+ return f
+ return None
+
class _GSettingsSchema:
def __init__(self, schema_name, schema_dir=None, schema_filename=None, **options):
if not schema_dir:
@@ -38,9 +46,14 @@
if not schema_filename:
schema_filename = schema_name + ".gschema.xml"
+ schema_prefix = os.path.join('glib-2.0', 'schemas')
schema_path = os.path.join(schema_dir, schema_filename)
if not os.path.exists(schema_path):
- logging.critical("Could not find schema %s" % schema_path)
+ schema_path = file_from_path(os.environ.get ('GSETTINGS_SCHEMA_PATH', '').split(os.path.pathsep), schema_filename)
+ if not (schema_path and os.path.exists(schema_path)):
+ schema_path = file_from_path(os.environ.get ('XDG_DATA_DIRS', '').split(os.path.pathsep), os.path.join(schema_prefix, schema_filename))
+ if not (schema_path and os.path.exists(schema_path)):
+ logging.critical("Could not find schema %s" % schema_filename)
assert(False)
self._schema_name = schema_name
='/guix/log/?id=807bd1ac449373c1da6feedc392ea7ca495b44f4'>root/gnu/packages/time.scm
Age | Commit message (Expand) | Author |
2023-06-21 | gnu: go-github-com-mattn-go-runewidth: Update to 0.0.14....* gnu/packages/golang.scm (go-github-com-mattn-go-runewidth): Update to 0.0.14.
(go-github.com-mattn-go-runewidth): Remove, and change users to to refer
to 'go-github-com-mattn-go-runewidth'.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| Nguyễn Gia Phong |
2023-05-10 | gnu: python-arrow: Update to 1.2.3....* gnu/packages/time.scm (python-arrow): Update to 1.2.3.
| Ricardo Wurmus |
2023-05-10 | gnu: Add python-dateutils....* gnu/packages/time.scm (python-dateutils): New variable.
| Ricardo Wurmus |
2023-05-08 | gnu: Add python-timezonefinder....* gnu/packages/time.scm (python-timezonefinder): New variable.
* gnu/packages/geo.scm (h3-3, python-h3-3): New variables. The latest
compatible versions to build python-timezonefinder.
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
| Sharlatan Hellseher |
2023-03-27 | gnu: python-isodate: Update to 0.6.1....* gnu/packages/time.scm (python-isodate): Update to 0.6.1.
Signed-off-by: Christopher Baines <mail@cbaines.net>
| Greg Hogan |