From 99ba4ddb03b396f56764a25317f40d4501380704 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 20 Nov 2022 23:16:51 +0100 Subject: gnu: nautilus: Fix crash due to loading extensions twice. Fixes . Reported by Tobias Kortkamp . Previously, if NAUTILUS_EXTENSION_PATH contained the same directory several times, Nautilus could end up loading the same extension a second time and crash. This patch ensures that each extension cannot be loaded more than once. * gnu/packages/patches/nautilus-extension-search-path.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gnome.scm (nautilus)[source]: Use it. [arguments]: Remove 'make-extensible' phase. --- gnu/packages/gnome.scm | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) (limited to 'gnu/packages/gnome.scm') diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 3d942635a2..78e65d7400 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -9671,7 +9671,9 @@ shared object databases, search tools and indexing.") name "-" version ".tar.xz")) (sha256 (base32 - "1cncyiyh79w1id6a6s2f0rxmgwl65lp4ml4afa0z35jrnwp2s8cr")))) + "1cncyiyh79w1id6a6s2f0rxmgwl65lp4ml4afa0z35jrnwp2s8cr")) + (patches + (search-patches "nautilus-extension-search-path.patch")))) (build-system meson-build-system) (arguments (list @@ -9685,27 +9687,6 @@ shared object databases, search tools and indexing.") (substitute* "test/automated/displayless/meson.build" (("^foreach t: tracker_tests" all) (string-append "tracker_tests = []\n" all))))) - (add-after 'unpack 'make-extensible - (lambda _ - (substitute* "src/nautilus-module.c" - (("static gboolean initialized = FALSE;" all) - (string-append all " -const char *extension_path; -char **extension_dirs, **d; -") - ) - (("load_module_dir \\(NAUTILUS_EXTENSIONDIR\\);" all) - (string-append all - " -extension_path = g_getenv (\"NAUTILUS_EXTENSION_PATH\"); -if (extension_path) -{ - extension_dirs = g_strsplit (extension_path, \":\", -1); - for (d = extension_dirs; d != NULL && *d != NULL; d++) - load_module_dir(*d); - g_strfreev(extension_dirs); -} -"))))) (add-after 'unpack 'skip-gtk-update-icon-cache ;; Don't create 'icon-theme.cache'. (lambda _ -- cgit 1.4.1