Skip to contentSkip to conversation

libgpiod: fix packaging of tools

PATCH New Martin Hundebøll 1 participant 1 message Jan 26, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libgpiod: fix packaging of tools

The default packaging adds files from ${bindir} to the primary package, so that following packages don't see any files in ${bindir}. This causes the libgpiod-tools package to empty, as it is appended (+=) to PACKAGES.

Change the assignment to PACKAGES to a prepend (=+) to populate the libgpiod-tools package with the gpio{detect,find,get,info,mon,set} executables.

To avoid missing tools for existing installations of libgpiod, the libgpiod-tools package is setup as a recommendation by libgpiod when the tools package config is enabled.

---
 meta-oe/recipes-support/libgpiod/libgpiod.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta-oe/recipes-support/libgpiod/libgpiod.bb +4 -1
index 6aa27ad57..b2e3bae69 100644
@@ -18,6 +18,9 @@ PACKAGECONFIG ?= "tools"
 PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev"
 PACKAGECONFIG[tools] = "--enable-tools,--disable-tools,"
 
-PACKAGES += " ${PN}-tools"
+PACKAGES =+ " ${PN}-tools"
 
 FILES_${PN}-tools = "${bindir}/*"
+
+RRECOMMENDS_TOOLS = "${@bb.utils.contains('PACKAGECONFIG', 'tools', '${PN}-tools', '',d)}"
+RRECOMMENDS_${PN} += "${RRECOMMENDS_TOOLS}"
Signature · 1 line
2.16.1