[gnome-photos/sam/tracker3: 19/21] Revert "Switch to private instances of the Tracker 2.x daemons"
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/sam/tracker3: 19/21] Revert "Switch to private instances of the Tracker 2.x daemons"
- Date: Sun, 14 Feb 2021 23:08:21 +0000 (UTC)
commit cfd7e2ca1dd3dd79e22f1263cb2af10ec3c43579
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Feb 14 23:21:59 2021 +0100
Revert "Switch to private instances of the Tracker 2.x daemons"
This reverts commit fb31e2a8686a05b879ac2b3259acbfb8de230663.
data/meson.build | 29 ----------
....gnome.Photos.Tracker1.Miner.Extract.service.in | 8 ---
...rg.gnome.Photos.Tracker1.Miner.Files.service.in | 8 ---
data/org.gnome.Photos.Tracker1.service.in | 3 --
data/org.gnome.Photos.rule.in | 39 --------------
flatpak/org.gnome.Photos.json | 9 +++-
meson.build | 1 -
meson_post_install.py | 14 -----
src/photos-application.c | 62 ++++++++--------------
src/photos-indexing-notification.c | 4 +-
src/photos-tracker-change-monitor.c | 2 +-
src/photos-tracker-import-controller.c | 2 +-
src/photos-tracker-queue.c | 2 -
13 files changed, 33 insertions(+), 150 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index f51a4511..534ef3e0 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -45,35 +45,6 @@ configure_file(
install_dir: dbus_services_dir,
)
-tracker_domain_conf = configuration_data()
-tracker_domain_conf.set('libexecdir', photos_libexecdir)
-
-domain_ontology_rule = photos_namespace + '.rule'
-
-configure_file(
- input: domain_ontology_rule + '.in',
- output: domain_ontology_rule,
- configuration: tracker_domain_conf,
- install: true,
- install_dir: join_paths(photos_datadir, 'tracker', 'domain-ontologies'),
-)
-
-tracker_domain_services = [
- 'Tracker1',
- 'Tracker1.Miner.Extract',
- 'Tracker1.Miner.Files'
-]
-
-foreach service: tracker_domain_services
- configure_file(
- input: '@0@.@1 service in'.format(photos_namespace, service),
- output: '@0@.@1@.service'.format(photos_namespace, service),
- configuration: tracker_domain_conf,
- install: true,
- install_dir: dbus_services_dir,
- )
-endforeach
-
install_data(
photos_namespace + '.search-provider.ini',
install_dir: join_paths(photos_datadir, 'gnome-shell', 'search-providers'),
diff --git a/flatpak/org.gnome.Photos.json b/flatpak/org.gnome.Photos.json
index fe5c0e46..52ac5c8a 100644
--- a/flatpak/org.gnome.Photos.json
+++ b/flatpak/org.gnome.Photos.json
@@ -268,7 +268,7 @@
{
"name": "tracker",
"buildsystem": "meson",
- "cleanup": [ "/bin", "/etc", "/lib/girepository-1.0", "/share/dbus-1", "/share/gir-1.0" ],
+ "cleanup": [ "/bin", "/etc", "/lib/girepository-1.0", "/libexec", "/share/dbus-1",
"/share/gir-1.0" ],
"config-opts": [ "-Dbash_completion=no", "-Ddocs=false", "-Dsystemd_user_services=no" ],
"sources": [
{
@@ -293,13 +293,18 @@
"name": "tracker-miners",
"buildsystem": "meson",
"cleanup": [ "/etc",
+ "/lib",
+ "/libexec",
"/share/dbus-1/services/org.freedesktop.Tracker1.Miner.Extract.service",
"/share/dbus-1/services/org.freedesktop.Tracker1.Writeback.service",
"/share/tracker/miners/org.freedesktop.Tracker1.Miner.Applications.service",
"/share/tracker/miners/org.freedesktop.Tracker1.Miner.Extract.service",
"/share/tracker/miners/org.freedesktop.Tracker1.Miner.RSS.service",
+ "/share/tracker-miners",
+ "/share/glib-2.0/schemas/org.freedesktop.Tracker.Extract.gschema.xml",
"/share/glib-2.0/schemas/org.freedesktop.Tracker.Writeback.gschema.xml" ],
- "config-opts": [ "-Dextract=true",
+ "config-opts": [ "-Dextract=false",
+ "-Dgeneric_media_extractor=none",
"-Dminer_fs=true",
"-Dminer_rss=false",
"-Dsystemd_user_services=no",
diff --git a/meson.build b/meson.build
index 74561547..8e97e6a2 100644
--- a/meson.build
+++ b/meson.build
@@ -223,5 +223,4 @@ run_target(script_name, command: [find_program(script_name + '.sh'), source_root
meson.add_install_script(
'meson_post_install.py',
photos_datadir,
- dbus_services_dir,
)
diff --git a/meson_post_install.py b/meson_post_install.py
index 298a390e..15a1bc17 100644
--- a/meson_post_install.py
+++ b/meson_post_install.py
@@ -28,17 +28,3 @@ if not destdir:
schemadir = os.path.join(datadir, 'glib-2.0', 'schemas')
print('Compiling gsettings schemas...')
subprocess.call(['glib-compile-schemas', schemadir])
-
-dbusservicesdir = sys.argv[2]
-trackerdir = os.path.join(datadir, 'tracker', 'miners')
-
-miners = ["org.gnome.Photos.Tracker1.Miner.Extract.service", "org.gnome.Photos.Tracker1.Miner.Files.service"]
-
-os.makedirs(trackerdir, exist_ok=True)
-for miner in miners:
- dst = os.path.join(trackerdir, miner)
- src = os.path.join(dbusservicesdir, miner)
- try:
- os.symlink(src, dst)
- except FileExistsError:
- pass
diff --git a/src/photos-application.c b/src/photos-application.c
index 0393f68a..b444b321 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -128,7 +128,6 @@ struct _PhotosApplication
PhotosSearchProvider *search_provider;
PhotosSelectionController *sel_cntrlr;
PhotosThumbnailFactory *factory;
- TrackerMinerManager *miner_manager;
TrackerExtractPriority *extract_priority;
gboolean empty_results;
gboolean main_window_deleted;
@@ -175,7 +174,6 @@ static const gchar *DESKTOP_KEY_PICTURE_OPTIONS = "picture-options";
static const gchar *DESKTOP_KEY_COLOR_SHADING_TYPE = "color-shading-type";
static const gchar *DESKTOP_KEY_PRIMARY_COLOR = "primary-color";
static const gchar *DESKTOP_KEY_SECONDARY_COLOR = "secondary-color";
-static const gchar *MINER_FILES = "org.gnome.Photos.Tracker1.Miner.Files";
typedef struct _PhotosApplicationCreateData PhotosApplicationCreateData;
typedef struct _PhotosApplicationImportData PhotosApplicationImportData;
@@ -198,6 +196,7 @@ struct _PhotosApplicationImportData
GFile *import_sub_dir;
GList *files;
PhotosBaseItem *collection;
+ TrackerMinerManager *manager;
gchar *collection_urn;
gint64 ctime_latest;
};
@@ -250,6 +249,7 @@ photos_application_create_data_free (PhotosApplicationCreateData *data)
static PhotosApplicationImportData *
photos_application_import_data_new (PhotosApplication *application,
+ TrackerMinerManager *manager,
GList *files,
gint64 ctime_latest)
{
@@ -258,6 +258,7 @@ photos_application_import_data_new (PhotosApplication *application,
data = g_slice_new0 (PhotosApplicationImportData);
g_application_hold (G_APPLICATION (application));
data->application = application;
+ data->manager = g_object_ref (manager);
data->files = g_list_copy_deep (files, (GCopyFunc) g_object_ref, NULL);
data->ctime_latest = ctime_latest;
return data;
@@ -278,6 +279,7 @@ photos_application_import_data_free (PhotosApplicationImportData *data)
g_clear_object (&data->destination);
g_clear_object (&data->import_sub_dir);
g_list_free_full (data->files, g_object_unref);
+ g_clear_object (&data->manager);
g_free (data->collection_urn);
g_slice_free (PhotosApplicationImportData, data);
}
@@ -829,7 +831,7 @@ photos_application_create_window (PhotosApplication *self)
g_application_hold (G_APPLICATION (self));
tracker_extract_priority_proxy_new_for_bus (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_NONE,
- "org.gnome.Photos.Tracker1.Miner.Extract",
+ "org.freedesktop.Tracker1.Miner.Extract",
"/org/freedesktop/Tracker1/Extract/Priority",
self->create_window_cancellable,
photos_application_tracker_extract_priority,
@@ -1322,6 +1324,7 @@ photos_application_import_file_copy (GObject *source_object, GAsyncResult *res,
PhotosApplication *self = data->application;
g_autoptr (GFile) destination = NULL;
GFile *source = G_FILE (source_object);
+ TrackerMinerManager *manager = data->manager;
{
g_autoptr (GError) error = NULL;
@@ -1362,7 +1365,7 @@ photos_application_import_file_copy (GObject *source_object, GAsyncResult *res,
g_application_hold (G_APPLICATION (self));
g_application_mark_busy (G_APPLICATION (self));
- tracker_miner_manager_index_file_for_process_async (self->miner_manager,
+ tracker_miner_manager_index_file_for_process_async (manager,
destination,
NULL,
photos_application_import_index_file,
@@ -1517,6 +1520,7 @@ photos_application_import (PhotosApplication *self)
GtkWidget *dialog;
g_autoptr (PhotosApplicationImportData) data = NULL;
PhotosSource *source;
+ TrackerMinerManager *manager = NULL; /* TODO: use g_autoptr */
gint64 ctime_latest = -1;
source = PHOTOS_SOURCE (photos_base_manager_get_active_object (self->state->src_mngr));
@@ -1530,11 +1534,17 @@ photos_application_import (PhotosApplication *self)
selection = photos_selection_controller_get_selection (self->sel_cntrlr);
g_return_if_fail (selection != NULL);
- if (self->miner_manager == NULL)
- {
- g_warning ("No TrackerMinerManager, importing from attached devices won't work");
- goto out;
- }
+ {
+ g_autoptr (GError) error = NULL;
+
+ manager = tracker_miner_manager_new_full (FALSE, &error);
+ if (error != NULL)
+ {
+ g_warning ("Unable to create a TrackerMinerManager, importing from attached devices won't work: %s",
+ error->message);
+ goto out;
+ }
+ }
for (l = selection; l != NULL; l = l->next)
{
@@ -1563,13 +1573,14 @@ photos_application_import (PhotosApplication *self)
dialog = photos_import_dialog_new (GTK_WINDOW (self->main_window), ctime_latest);
gtk_widget_show_all (dialog);
- data = photos_application_import_data_new (self, files, ctime_latest);
+ data = photos_application_import_data_new (self, manager, files, ctime_latest);
g_signal_connect (dialog,
"response",
G_CALLBACK (photos_application_import_response),
g_steal_pointer (&data));
out:
+ g_clear_object (&manager);
g_list_free_full (files, g_object_unref);
}
@@ -2235,35 +2246,7 @@ photos_application_share_current (PhotosApplication *self)
static void
photos_application_start_miners (PhotosApplication *self)
{
- {
- g_autoptr (GError) error = NULL;
-
- self->miner_manager = tracker_miner_manager_new_full (TRUE, &error);
- if (error != NULL)
- g_warning ("Unable to create a TrackerMinerManager: %s", error->message);
- }
-
- if (self->miner_manager != NULL)
- {
- GSList *available = NULL;
- GSList *miner_files = NULL;
-
- available = tracker_miner_manager_get_available (self->miner_manager);
- miner_files = g_slist_find_custom (available, MINER_FILES, (GCompareFunc) strcmp);
- if (miner_files == NULL)
- {
- g_warning ("Unable to find miner %s", MINER_FILES);
- }
- else
- {
- if (!tracker_miner_manager_is_active (self->miner_manager, MINER_FILES))
- g_warning ("Unable to activate miner %s", MINER_FILES);
- }
-
- g_slist_free_full (available, g_free);
- }
-
- photos_application_create_online_miners (self);
+ photos_application_create_online_miners (self);
}
@@ -3023,7 +3006,6 @@ photos_application_dispose (GObject *object)
g_clear_object (&self->sel_cntrlr);
g_clear_object (&self->factory);
g_clear_object (&self->extract_priority);
- g_clear_object (&self->miner_manager);
if (self->state != NULL)
{
diff --git a/src/photos-indexing-notification.c b/src/photos-indexing-notification.c
index 72394983..7b2ea7dd 100644
--- a/src/photos-indexing-notification.c
+++ b/src/photos-indexing-notification.c
@@ -56,7 +56,7 @@ enum
REMOTE_MINER_TIMEOUT = 10 /* s */
};
-static const gchar *MINER_FILES = "org.gnome.Photos.Tracker1.Miner.Files";
+static const gchar *MINER_FILES = "org.freedesktop.Tracker1.Miner.Files";
static void
@@ -242,7 +242,7 @@ photos_indexing_notification_init (PhotosIndexingNotification *self)
{
g_autoptr (GError) error = NULL;
- self->manager = tracker_miner_manager_new_full (TRUE, &error);
+ self->manager = tracker_miner_manager_new_full (FALSE, &error);
if (error != NULL)
{
g_warning ("Unable to create a TrackerMinerManager, indexing progress notification won't work: %s",
diff --git a/src/photos-tracker-change-monitor.c b/src/photos-tracker-change-monitor.c
index 44c9ffe7..2e9810aa 100644
--- a/src/photos-tracker-change-monitor.c
+++ b/src/photos-tracker-change-monitor.c
@@ -434,7 +434,7 @@ photos_tracker_change_monitor_initable_init (GInitable *initable, GCancellable *
self->resource_service = tracker_resources_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_NONE,
- "org.gnome.Photos.Tracker1",
+ "org.freedesktop.Tracker1",
"/org/freedesktop/Tracker1/Resources",
cancellable,
error);
diff --git a/src/photos-tracker-import-controller.c b/src/photos-tracker-import-controller.c
index 9f130714..085ace3a 100644
--- a/src/photos-tracker-import-controller.c
+++ b/src/photos-tracker-import-controller.c
@@ -424,7 +424,7 @@ photos_tracker_import_controller_init (PhotosTrackerImportController *self)
{
g_autoptr (GError) error = NULL;
- self->manager = tracker_miner_manager_new_full (TRUE, &error);
+ self->manager = tracker_miner_manager_new_full (FALSE, &error);
if (error != NULL)
g_warning ("Unable to create a TrackerMinerManager, indexing attached devices won't work: %s",
error->message);
}
diff --git a/src/photos-tracker-queue.c b/src/photos-tracker-queue.c
index 76d25d5d..6ac829cd 100644
--- a/src/photos-tracker-queue.c
+++ b/src/photos-tracker-queue.c
@@ -290,8 +290,6 @@ photos_tracker_queue_initable_init (GInitable *initable, GCancellable *cancellab
g_assert_no_error (self->initialization_error);
- tracker_sparql_connection_set_domain ("org.gnome.Photos");
-
self->connection = tracker_sparql_connection_get (cancellable, &self->initialization_error);
if (G_UNLIKELY (self->initialization_error != NULL))
goto out;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]