[gnome-settings-daemon/benzea/systemd-3-36: 5/5] plugins: Mask old target names on non-release builds



commit 3a2a2e4c8757ae1b750040eaba476d7670a89685
Author: Benjamin Berg <bberg redhat com>
Date:   Fri Feb 14 19:09:10 2020 +0100

    plugins: Mask old target names on non-release builds
    
    This means we cannot accidentally start the old targets in case they
    exist on the host system. It is solely useful when using jhbuild to run
    a test session and is disabled on release builds for that reason.

 plugins/meson.build | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/plugins/meson.build b/plugins/meson.build
index b91bae66..656ce5ed 100644
--- a/plugins/meson.build
+++ b/plugins/meson.build
@@ -161,6 +161,14 @@ foreach plugin: all_plugins
                 install_dir: systemd_userunitdir
             )
 
+            # Wipe out old target names in non-release builds; this saves a lot
+            # of pain when running a new g-s-d inside jhbuild on an old host
+            # TODO: Should be deleted once we can assume developers have 3.36
+            #       installed on their machines.
+            if get_option('buildtype') != 'release'
+                meson.add_install_script('ln', '-vfs', '/dev/null', systemd_userunitdir / 
'gsd-@0@.target'.format(plugin_name))
+            endif
+
             foreach target: gates_all
                 meson.add_install_script('meson-add-wants.sh', systemd_userunitdir, target + '.wants/', 
user_target)
             endforeach


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