diff mbox

[v2,3/3] gpsd: disable attempt to reload systemd

Message ID 1446748914-12628-3-git-send-email-james.knight@rockwellcollins.com
State Changes Requested
Headers show

Commit Message

James Knight Nov. 5, 2015, 6:41 p.m. UTC
The following disables the attempt to reload the host system's systemd
(`systemctl daemon-reload`; if any) when installing the gpsd package.
In previous attempts, the command would invoke and fail (either by being
non-existent or a system policy kit would timeout) falling back to a
`true` invoke.

Signed-off-by: James Knight <james.knight@rockwellcollins.com>
---
Changes v1 -> v2:
  - Package change introduced in change set 2.
---
 package/gpsd/gpsd.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Thomas Petazzoni Nov. 5, 2015, 9:39 p.m. UTC | #1
Dear James Knight,

On Thu,  5 Nov 2015 13:41:54 -0500, James Knight wrote:
> The following disables the attempt to reload the host system's systemd
> (`systemctl daemon-reload`; if any) when installing the gpsd package.
> In previous attempts, the command would invoke and fail (either by being
> non-existent or a system policy kit would timeout) falling back to a
> `true` invoke.
> 
> Signed-off-by: James Knight <james.knight@rockwellcollins.com>
> ---
> Changes v1 -> v2:
>   - Package change introduced in change set 2.
> ---
>  package/gpsd/gpsd.mk | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/package/gpsd/gpsd.mk b/package/gpsd/gpsd.mk
> index 5a369b0..40b95f7 100644
> --- a/package/gpsd/gpsd.mk
> +++ b/package/gpsd/gpsd.mk
> @@ -234,4 +234,12 @@ endef
>  GPSD_POST_INSTALL_TARGET_HOOKS += GPSD_INSTALL_UDEV_RULES
>  endif
>  
> +ifeq ($(BR2_PACKAGE_SYSTEMD),y)
> +define GPSD_DISABLE_SYSTEMD_DAEMON_RELOAD
> +	$(SED) 's/systemctl daemon-reload || //g' $(@D)/SConstruct
> +endef
> +
> +GPSD_POST_PATCH_HOOKS += GPSD_DISABLE_SYSTEMD_DAEMON_RELOAD
> +endif

I see the problem, but rather than this $(SED) expression, could you
create a proper patch against the gpsd sources ? The risk with the
$(SED) expression is that we might forget about it when updating gpsd
in the future.

Also, can you raise the issue with the upstream gpsd developers? Maybe
they could introduce some SConstruct command line option to explicitly
disable restarting the systemd service. Or maybe the SConstruct already
has a way of knowing that it is cross-compiling, in which case doing
this systemctl call is silly.

Thanks!

Thomas
James Knight Nov. 6, 2015, 4:07 p.m. UTC | #2
Thomas,

On Thu, Nov 5, 2015 at 4:39 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> rather than this $(SED) expression, could you
> create a proper patch against the gpsd sources ?

Gah! I was going to make a patch but figured the SED option would be
preferred. Oops.

I take at look trying to get these changes (this and the other patch
related to gpsd udev) upstream.

As always, thanks for the commits/comments.
diff mbox

Patch

diff --git a/package/gpsd/gpsd.mk b/package/gpsd/gpsd.mk
index 5a369b0..40b95f7 100644
--- a/package/gpsd/gpsd.mk
+++ b/package/gpsd/gpsd.mk
@@ -234,4 +234,12 @@  endef
 GPSD_POST_INSTALL_TARGET_HOOKS += GPSD_INSTALL_UDEV_RULES
 endif
 
+ifeq ($(BR2_PACKAGE_SYSTEMD),y)
+define GPSD_DISABLE_SYSTEMD_DAEMON_RELOAD
+	$(SED) 's/systemctl daemon-reload || //g' $(@D)/SConstruct
+endef
+
+GPSD_POST_PATCH_HOOKS += GPSD_DISABLE_SYSTEMD_DAEMON_RELOAD
+endif
+
 $(eval $(generic-package))