[tracker-miners/sam/tracker-miners-2.3-no-autostart] Disable miner autostart by default




commit 57e5e1dea420644434205a6ae23c02a0196680a2
Author: Sam Thursfield <sam afuera me uk>
Date:   Tue Sep 1 15:54:26 2020 +0200

    Disable miner autostart by default
    
    GNOME is switching to Tracker 3 by default, see https://gitlab.gnome.org/GNOME/Initiatives/-/issues/17
    for background. In the GNOME 3.38 release, there is one core app
    (Photos) which is not ready to switch.
    
    We need to avoid Tracker 2.x and Tracker 3.x miners running in parallel.
    To solve this, we disable Tracker 2.x miners from starting
    automatically, and modify Photos to start the miners on demand.
    
    Corresponding Photos branch is: https://gitlab.gnome.org/GNOME/gnome-photos/-/merge_requests/146
    
    Use of Tracker 2.x is deprecated, but the old behaviour can be restored
    by passing `-Dautostart=true` at configure time.

 meson_options.txt               |  2 ++
 src/miners/fs/meson.build       | 10 +++++++---
 src/miners/rss/meson.build      | 10 +++++++---
 src/tracker-extract/meson.build | 10 +++++++---
 4 files changed, 23 insertions(+), 9 deletions(-)
---
diff --git a/meson_options.txt b/meson_options.txt
index ca00f1fc1..cc332b69d 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -77,6 +77,8 @@ option('generic_media_extractor', type: 'combo', choices: ['auto', 'gstreamer',
 option('gstreamer_backend', type: 'combo', choices: ['discoverer', 'gupnp'], value: 'discoverer',
        description: 'When GStreamer is used, this enables one of the (discoverer, gupnp) GStreamer backends')
 
+option('autostart', type: 'boolean', value: false,
+       description: 'Install .desktop files into $sysconfdir/xdg/autostart so miners start along with 
desktop session')
 option('dbus_services', type: 'string', value: '',
        description: 'Directory to install D-Bus .service files (leave blank to use the value from 
dbus-1.pc)')
 option('systemd_user_services', type: 'string', value: 'yes',
diff --git a/src/miners/fs/meson.build b/src/miners/fs/meson.build
index b58bfbd71..a770516c9 100644
--- a/src/miners/fs/meson.build
+++ b/src/miners/fs/meson.build
@@ -54,9 +54,13 @@ desktop_file_untranslated = configure_file(
 desktop_file = custom_target('tracker-miner-fs-desktop-file',
     input: desktop_file_untranslated,
     output: 'tracker-miner-fs.desktop',
-    command: ['intltool-merge', '--quiet', '--desktop-style', '--utf8', join_paths(meson.source_root(), 
'po'), '@INPUT@', '@OUTPUT@'],
-    install: true,
-    install_dir: join_paths(get_option('sysconfdir'), 'xdg/autostart'))
+    command: ['intltool-merge', '--quiet', '--desktop-style', '--utf8', join_paths(meson.source_root(), 
'po'), '@INPUT@', '@OUTPUT@'])
+
+if get_option('autostart')
+  install_data(desktop_file,
+      install: true,
+      install_dir: join_paths(get_option('sysconfdir'), 'xdg/autostart'))
+endif
 
 if install_systemd_user_services
   configure_file(
diff --git a/src/miners/rss/meson.build b/src/miners/rss/meson.build
index 239394049..f540befe2 100644
--- a/src/miners/rss/meson.build
+++ b/src/miners/rss/meson.build
@@ -31,9 +31,13 @@ desktop_file_untranslated = configure_file(
 desktop_file = custom_target('tracker-miner-rss-desktop-file',
     input: desktop_file_untranslated,
     output: 'tracker-miner-rss.desktop',
-    command: ['intltool-merge', '--quiet', '--desktop-style', '--utf8', join_paths(meson.source_root(), 
'po'), '@INPUT@', '@OUTPUT@'],
-    install: true,
-    install_dir: join_paths(get_option('sysconfdir'), 'xdg/autostart'))
+    command: ['intltool-merge', '--quiet', '--desktop-style', '--utf8', join_paths(meson.source_root(), 
'po'), '@INPUT@', '@OUTPUT@'])
+
+if get_option('autostart')
+  install_data(desktop_file,
+      install: true,
+      install_dir: join_paths(get_option('sysconfdir'), 'xdg/autostart'))
+endif
 
 if install_systemd_user_services
   configure_file(
diff --git a/src/tracker-extract/meson.build b/src/tracker-extract/meson.build
index 775771de2..239907179 100644
--- a/src/tracker-extract/meson.build
+++ b/src/tracker-extract/meson.build
@@ -189,9 +189,13 @@ desktop_file_untranslated = configure_file(
 desktop_file = custom_target('tracker-extract-desktop-file',
   input: desktop_file_untranslated,
   output: 'tracker-extract.desktop',
-  command: ['intltool-merge', '--quiet', '--desktop-style', '--utf8', join_paths(meson.source_root(), 'po'), 
'@INPUT@', '@OUTPUT@'],
-  install: true,
-  install_dir: join_paths(get_option('sysconfdir'), 'xdg/autostart'))
+  command: ['intltool-merge', '--quiet', '--desktop-style', '--utf8', join_paths(meson.source_root(), 'po'), 
'@INPUT@', '@OUTPUT@'])
+
+if get_option('autostart')
+  install_data(desktop_file,
+      install: true,
+      install_dir: join_paths(get_option('sysconfdir'), 'xdg/autostart'))
+endif
 
 if install_systemd_user_services
   configure_file(


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