[tracker/wip/carlosg/test] baz




commit fb1f948dd031d112d9d4f96d2013b54dd235f93d
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Jul 28 16:32:32 2021 +0200

    baz

 .gitlab-ci.yml                                |  1 +
 src/libtracker-sparql/meson.build             |  3 +--
 src/libtracker-sparql/tracker-remote-module.c | 13 +++++++++++++
 3 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2bfc455a9..dbe5b92ee 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -195,6 +195,7 @@ check-code-style:
       if [ -z "$NO_DOCS" ]; then ninja -C build libtracker-sparql-3-doc ontology-3-doc; fi
   artifacts:
     expire_in: 1 day
+    when: always
     paths:
       - build
 
diff --git a/src/libtracker-sparql/meson.build b/src/libtracker-sparql/meson.build
index af4e9f3a1..206d7392a 100644
--- a/src/libtracker-sparql/meson.build
+++ b/src/libtracker-sparql/meson.build
@@ -162,8 +162,6 @@ libtracker_sparql = library('tracker-sparql-' + tracker_api_version,
     ],
 
     link_whole: [libtracker_sparql_intermediate],
-    link_depends: [ remote_modules ],
-
     dependencies: [tracker_common_dep, tracker_sparql_bus_dep, tracker_sparql_direct_dep, 
tracker_sparql_vapi_dep, gmodule, libdl],
 )
 
@@ -192,6 +190,7 @@ pkg.generate(libtracker_sparql,
 if get_option('introspection').enabled()
     tracker_sparql_gir = gnome.generate_gir(libtracker_sparql,
         sources: libtracker_sparql_c_sources + libtracker_sparql_c_public_headers,
+        dependencies: remote_modules,
         nsversion: tracker_api_version,
         namespace: 'Tracker',
         identifier_prefix: 'Tracker',
diff --git a/src/libtracker-sparql/tracker-remote-module.c b/src/libtracker-sparql/tracker-remote-module.c
index 5dd4a4d7a..f07d40ee3 100644
--- a/src/libtracker-sparql/tracker-remote-module.c
+++ b/src/libtracker-sparql/tracker-remote-module.c
@@ -49,11 +49,24 @@ tracker_init_remote (void)
                gchar *module_path;
 
                if (g_strcmp0 (g_get_current_dir (), BUILDROOT) == 0) {
+                       int tries = 0;
+
                        /* Detect in-build runtime of this code, this may happen
                         * building introspection information or running tests.
                         * We want the in-tree modules to be loaded then.
                         */
                        module_path = g_strdup_printf (BUILD_LIBDIR "/%s", modules[i]);
+
+                       g_warning ("File exists: %d", g_file_test (module_path, G_FILE_TEST_EXISTS));
+                       for (tries = 0; tries < 10; tries++) {
+                               if (g_file_test (module_path, G_FILE_TEST_EXISTS) &&
+                                   g_module_open (module_path,
+                                                  G_MODULE_BIND_LAZY |
+                                                  G_MODULE_BIND_LOCAL) != NULL)
+                                       break;
+
+                               g_usleep (1000000);
+                       }
                } else {
                        module_path = g_strdup_printf (PRIVATE_LIBDIR "/%s", modules[i]);
                }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]