From 889294a93fc6464c2c2919bc47f6fd85ec823363 Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Tue, 18 May 2021 19:57:00 -0400 Subject: [PATCH] [PATCH]: Honor GUIX_GTK4_PATH. This patch makes GTK look for additional modules in a list of directories specified by the environment variable "GUIX_GTK4_PATH". This can be used instead of "GTK_PATH" to make GTK find modules that are incompatible with other major versions of GTK. --- gtk/gtkmodules.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c index aace5dcbc9..193b6a02e9 100644 --- a/gtk/gtkmodules.c +++ b/gtk/gtkmodules.c @@ -105,6 +105,7 @@ static char ** get_module_path (void) { const char *module_path_env; + const gchar *module_guix_gtk4_path_env; const char *exe_prefix; char *module_path; char *default_dir; @@ -114,6 +115,7 @@ get_module_path (void) return result; module_path_env = g_getenv ("GTK_PATH"); + module_guix_gtk4_path_env = g_getenv ("GUIX_GTK4_PATH"); exe_prefix = g_getenv ("GTK_EXE_PREFIX"); if (exe_prefix) @@ -121,7 +123,13 @@ get_module_path (void) else default_dir = g_build_filename (_gtk_get_libdir (), "gtk-4.0", NULL); - if (module_path_env) + if (module_guix_gtk4_path_env && module_path_env) + module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, + module_guix_gtk4_path_env, module_path_env, default_dir, NULL); + else if (module_guix_gtk4_path_env) + module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, + module_guix_gtk4_path_env, default_dir, NULL); + else if (module_path_env) module_path = g_build_path (G_SEARCHPATH_SEPARATOR_S, module_path_env, default_dir, NULL); else -- 2.31.1 on>
path: root/tests/store-database.scm
AgeCommit message (Expand)Author
2018-07-20database: Reset timestamps to one second after the Epoch....Previously, store items registered in the database by this code (for instance, store items retrieved by 'guix offload' and passed to 'restore-file-set') would have an mtime of 0 instead of 1. This would cause problems for things like .go files: Guile would consider them to be older than the corresponding .scm file, and consequently it would ignore them and possibly use another (incorrect) .go file. Reported by Ricardo Wurmus. * guix/store/database.scm (reset-timestamps): Pass 1, not 0, to 'utime'. * tests/store-database.scm ("register-path"): Check the mtime of FILE and REF. Ludovic Courtès
2018-06-14store: Remove 'register-path'....* guix/store.scm (register-path): Remove. * guix/nar.scm: Use (guix store database). * guix/scripts/system.scm: Likewise. * tests/store-database.scm: Remove #:hide (register-path). * tests/store.scm ("register-path"): Remove. Ludovic Courtès
2018-06-14database: 'sqlite-register' takes a database, not a file name....* guix/store/database.scm (sqlite-register): Remove #:db-file and add 'db' parameter. Remove #:schema and 'parameterize'. (register-path): Wrap 'sqlite-register' call in 'with-database' and in 'parameterize'. * tests/store-database.scm ("new database") ("register-path with unregistered references"): Adjust accordingly. Ludovic Courtès
2018-06-14database: Fail registration when encountering unregistered references....* guix/store/database.scm (add-reference-sql): Remove nested SELECT. (add-references): Expect REFERENCES to be a list of ids. (sqlite-register): Call 'path-id' for each of REFERENCES and pass it to 'add-references'. * tests/store-database.scm ("register-path with unregistered references"): New test. Ludovic Courtès
2018-06-14database: 'with-database' can now initialize new databases....* nix/libstore/schema.sql: Rename to... * guix/store/schema.sql: ... this. * Makefile.am (nobase_dist_guilemodule_DATA): Add it. * nix/local.mk (%D%/libstore/schema.sql.hh): Adjust accordingly. * guix/store/database.scm (sql-schema): New variable. (sqlite-exec, initialize-database, call-with-database): New procedures. (with-database): Rewrite in terms of 'call-with-database'. * tests/store-database.scm ("new database"): New test. * guix/self.scm (compiled-guix)[*core-modules*]: Add 'schema.sql' to #:extra-files. Ludovic Courtès
2018-06-01Add (gnu store database)....* guix/config.scm.in (%store-database-directory): New variable. * guix/store/database.scm: New file. * tests/store-database.scm: New file. * Makefile.am (STORE_MODULES): New variable. (MODULES, MODULES_NOT_COMPILED): Adjust accordingly. (SCM_TESTS) [HAVE_GUILE_SQLITE3]: Add tests/store-database.scm. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Caleb Ristvedt