Commit 0524136e authored by James Knight's avatar James Knight Committed by Thomas Petazzoni
Browse files

gpsd: adjust udev rules file permissions



Adjust a generated udev rule file (25-gpsd.rules) to have user write
permissions. This is to prevent rebuild issues when the gpsd package
fails to re-install on a target (since the `cp` of the rule file will
fail due to permissions).

[Thomas: minor tweaks to code comments and commit title.]

Signed-off-by: default avatarJames Knight <james.knight@rockwellcollins.com>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent e125bab6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -217,6 +217,8 @@ define GPSD_INSTALL_STAGING_CMDS
		install)
endef

# After installing the udev rule, make it writable so that this
# package can be re-built/re-installed.
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
define GPSD_INSTALL_UDEV_RULES
	(cd $(@D); \
@@ -225,6 +227,7 @@ define GPSD_INSTALL_UDEV_RULES
		$(SCONS) \
		$(GPSD_SCONS_OPTS) \
		udev-install)
	chmod u+w $(TARGET_DIR)/lib/udev/rules.d/25-gpsd.rules
endef

GPSD_POST_INSTALL_TARGET_HOOKS += GPSD_INSTALL_UDEV_RULES