From: Martin Hundebøll Date: Mon, 5 Feb 2018 12:25:43 +0000 (+0100) Subject: usbutils: Split out lsusb.py X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~18795 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42af9fedd31ecf5c6210d2f85f20540f85da59f4;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 Signed-off-by: Ross Burton --- diff --git a/meta/recipes-bsp/usbutils/usbutils_009.bb b/meta/recipes-bsp/usbutils/usbutils_009.bb index 30522fd0f15..a7cbe454063 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 +}