diff mbox series

[1/2] package/libfuse: only install udev rules if (e)udev is enabled

Message ID 20190402205602.1823-1-peter@korsgaard.com
State Accepted
Headers show
Series [1/2] package/libfuse: only install udev rules if (e)udev is enabled | expand

Commit Message

Peter Korsgaard April 2, 2019, 8:56 p.m. UTC
No point in installing udev rules if nothing will use it.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/libfuse/libfuse.mk | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

Comments

Thomas Petazzoni April 3, 2019, 7:40 p.m. UTC | #1
On Tue,  2 Apr 2019 22:56:01 +0200
Peter Korsgaard <peter@korsgaard.com> wrote:

> No point in installing udev rules if nothing will use it.
> 
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
> ---
>  package/libfuse/libfuse.mk | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)

Both applied. Thanks!

Thomas
Peter Korsgaard April 5, 2019, 8:34 p.m. UTC | #2
>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > No point in installing udev rules if nothing will use it.
 > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Committed to 2019.02.x, thanks.
diff mbox series

Patch

diff --git a/package/libfuse/libfuse.mk b/package/libfuse/libfuse.mk
index 84027ebedb..ab0131b057 100644
--- a/package/libfuse/libfuse.mk
+++ b/package/libfuse/libfuse.mk
@@ -17,11 +17,18 @@  LIBFUSE_CONF_OPTS = \
 	--enable-util \
 	UDEV_RULES_PATH=/lib/udev/rules.d
 
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
+define LIBFUSE_INSTALL_UDEV
+	mkdir -p $(TARGET_DIR)/lib/udev/rules.d
+	cp $(STAGING_DIR)/lib/udev/rules.d/*-fuse.rules $(TARGET_DIR)/lib/udev/rules.d
+endef
+
+LIBFUSE_POST_INSTALL_TARGET_HOOKS += LIBFUSE_INSTALL_UDEV
+endif
+
 define LIBFUSE_INSTALL_TARGET_CMDS
 	cp -dpf $(STAGING_DIR)/usr/bin/fusermount $(TARGET_DIR)/usr/bin/
 	cp -dpf $(STAGING_DIR)/usr/lib/libfuse.so* $(TARGET_DIR)/usr/lib/
-	mkdir -p $(TARGET_DIR)/lib/udev/rules.d
-	cp $(STAGING_DIR)/lib/udev/rules.d/*-fuse.rules $(TARGET_DIR)/lib/udev/rules.d
 endef
 
 define LIBFUSE_DEVICES