summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Hundebøll <mnhu@prevas.dk>2018-02-05 13:25:43 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-02-16 17:56:33 +0000
commit42af9fedd31ecf5c6210d2f85f20540f85da59f4 (patch)
tree973f72344d4577b9e5ce63d0eb1eaed6a28752dc
parent5e4dc51944a4d6cea520ed7bd5dd02b50f1228dc (diff)
downloadopenembedded-core-contrib-42af9fedd31ecf5c6210d2f85f20540f85da59f4.tar.gz
usbutils: Split out lsusb.py
The pretty-printing "lsusb.py" script shipped by usbutils is currently useless, as it doesn't runtime depend on python, and has unversioned python in the shebang. Avoid adding a python dependency to current configurations with usbutils buy splitting lsusb.py into a usbutils-python package, and make it runtime depend on python3-core. Make the script usable by replacing the shebang with a direct call to ${bindir}/python3. Signed-off-by: Martin Hundebøll <mnhu@prevas.dk> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/recipes-bsp/usbutils/usbutils_009.bb8
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/recipes-bsp/usbutils/usbutils_009.bb b/meta/recipes-bsp/usbutils/usbutils_009.bb
index 30522fd0f1..a7cbe45406 100644
--- a/meta/recipes-bsp/usbutils/usbutils_009.bb
+++ b/meta/recipes-bsp/usbutils/usbutils_009.bb
@@ -22,3 +22,11 @@ FILES_${PN}-dev += "${datadir}/pkgconfig"
RRECOMMENDS_${PN} = "udev-hwdb"
RDEPENDS_${PN}-ptest = "libboost-system libboost-thread"
+
+PACKAGE_BEFORE_PN =+ "${PN}-python"
+FILES_${PN}-python += "${bindir}/lsusb.py"
+RDEPENDS_${PN}-python = "python3-core"
+
+do_install_append() {
+ sed -i -E '1s,#!.+python,#!${bindir}/python3,' ${D}${bindir}/lsusb.py
+}