[oe-commits] [openembedded-core] 02/49: usbutils: Split out lsusb.py
git at git.openembedded.org
git at git.openembedded.org
Thu Feb 15 21:51:24 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 4e4f05043c295e7eb991ba13a3b2a0b4e46b6234
Author: Martin Hundebøll <mnhu at prevas.dk>
AuthorDate: Mon Feb 5 13:25:43 2018 +0100
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 at prevas.dk>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/recipes-bsp/usbutils/usbutils_009.bb | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/meta/recipes-bsp/usbutils/usbutils_009.bb b/meta/recipes-bsp/usbutils/usbutils_009.bb
index 30522fd..a7cbe45 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
+}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list