0001-do-not-interact-with-systemctl-when-cross-compiling.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. From 777cb3737ae85b13642fff48eabb601c4d40f527 Mon Sep 17 00:00:00 2001
  2. From: James Knight <james.d.knight@live.com>
  3. Date: Tue, 16 Feb 2016 23:51:08 -0500
  4. Subject: [PATCH] do not interact with systemctl when cross-compiling
  5. The installation process for GPSd on a systemd environment will attempt
  6. to reload systemd's manager configuration (systemctl daemon-reload).
  7. This is to allow the system to take advantage of the newly installed
  8. GPSd services. When cross-compiling, the installation process should not
  9. attempt to interact with the build environment's systemd instance (if
  10. any). The following change checks if the build is not cross compiling
  11. (via 'not env["sysroot"]') before attempting to do a systemd reload.
  12. Signed-off-by: James Knight <james.d.knight@live.com>
  13. [yann.morin.1998@free.fr: tweak to apply on 3.16]
  14. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
  15. ---
  16. SConstruct | 4 +++-
  17. 1 file changed, 3 insertions(+), 1 deletion(-)
  18. diff --git a/SConstruct b/SConstruct
  19. index c3bfd0d1..97c1b3a9 100644
  20. --- a/SConstruct
  21. +++ b/SConstruct
  22. @@ -1909,10 +1909,12 @@ udev_install = Utility('udev-install', 'install', [
  23. ] + hotplug_wrapper_install)
  24. if env['systemd']:
  25. + env.Requires(udev_install, systemd_install)
  26. +
  27. +if env['systemd'] and not env["sysroot"]:
  28. systemctl_daemon_reload = Utility('systemctl-daemon-reload', '', [ 'systemctl daemon-reload || true'])
  29. env.AlwaysBuild(systemctl_daemon_reload)
  30. env.Precious(systemctl_daemon_reload)
  31. - env.Requires(udev_install, systemd_install)
  32. env.Requires(systemctl_daemon_reload, systemd_install)
  33. env.Requires(udev_install, systemctl_daemon_reload)
  34. --
  35. 2.11.0