usbutils: Split out lsusb.py
PATCH 1/1 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.
--- meta/recipes-bsp/usbutils/usbutils_009.bb | 8 ++++++++ 1 file changed, 8 insertions(+)
meta/recipes-bsp/usbutils/usbutils_009.bb +8 -0
@@ -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 +}
Signature · 1 line
2.16.1
PATCH 1/1 bind: add packageconfig for python-support
Break the hard runtime dependency on python3-core by adding a (default-on) packageconfig option for python.
--- meta/recipes-connectivity/bind/bind_9.10.6.bb | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
meta/recipes-connectivity/bind/bind_9.10.6.bb +10 -4
@@ -38,16 +38,19 @@ EXTRA_OECONF = " ${ENABLE_IPV6} --with-libtool --enable-threads \ --with-openssl=${STAGING_LIBDIR}/.. \ " -inherit autotools update-rc.d systemd useradd pkgconfig python3-dir +inherit autotools update-rc.d systemd useradd pkgconfig export PYTHON_SITEPACKAGES_DIR # PACKAGECONFIGs readline and libedit should NOT be set at same time -PACKAGECONFIG ?= "readline" +PACKAGECONFIG ?= "readline python" PACKAGECONFIG[httpstats] = "--with-libxml2,--without-libxml2,libxml2" PACKAGECONFIG[readline] = "--with-readline=-lreadline,,readline" PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit" PACKAGECONFIG[urandom] = "--with-randomdev=/dev/urandom,--with-randomdev=/dev/random,," +PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3-core,python3-core" + +inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)} USERADD_PACKAGES = "${PN}" USERADD_PARAM_${PN} = "--system --home ${localstatedir}/cache/bind --no-create-home \
@@ -60,7 +63,6 @@ SYSTEMD_SERVICE_${PN} = "named.service" PARALLEL_MAKE = "" -RDEPENDS_${PN} = "python3-core" RDEPENDS_${PN}-dev = "" PACKAGE_BEFORE_PN += "${PN}-utils"
@@ -88,7 +90,11 @@ do_install_append() { install -d "${D}${sysconfdir}/init.d" install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/" install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind" - sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' ${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds + + if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}" ]; then + sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' \ + ${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds + fi # Install systemd related files install -d ${D}${sbindir}
Signature · 1 line
2.16.1
Re: [PATCH] bind: add packageconfig for python-support
Quoted 61 lines · Martin Hundebøll
Break the hard runtime dependency on python3-core by adding a (default-on) packageconfig option for python.
Signed-off-by Martin Hundebøll <[email protected]>---
meta/recipes-connectivity/bind/bind_9.10.6.bb | 14 ++++++++++----1 file changed, 10 insertions(+), 4 deletions(-)meta/recipes-connectivity/bind/bind_9.10.6.bb +0
-0@@ -38,16 +38,19 @@ EXTRA_OECONF = " ${ENABLE_IPV6} --with-libtool -- enable-threads \ --with-openssl=${STAGING_LIBDIR}/.. \"
meta/recipes-connectivity/bind/bind_9.10.6.bb +1
-1-inherit autotools update-rc.d systemd useradd pkgconfig python3-dir +inherit autotools update-rc.d systemd useradd pkgconfig
exportPYTHON_SITEPACKAGES_DIR
# PACKAGECONFIGs readline and libedit should NOT be set at same timemeta/recipes-connectivity/bind/bind_9.10.6.bb +1
-1-PACKAGECONFIG ?= "readline" +PACKAGECONFIG ?= "readline python"PACKAGECONFIG[httpstats] = "--with-libxml2,--without- libxml2,libxml2"
PACKAGECONFIG[readline] = "--with-readline=-lreadline,,readline" PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit" PACKAGECONFIG[urandom] = "--with-randomdev=/dev/urandom,--with- randomdev=/dev/random,,"
+PACKAGECONFIG[python] = "--with-python=${PYTHON},--without- python,python3-core,python3-core"meta/recipes-connectivity/bind/bind_9.10.6.bb +2
-0+ +inherit ${@bb.utils.contains('PACKAGECONFIG', 'python','python3native', '', d)}
USERADD_PACKAGES = "${PN}"
USERADD_PARAM_${PN} = "--system --home ${localstatedir}/cache/bind --no-create-home \meta/recipes-connectivity/bind/bind_9.10.6.bb +0
-0@@ -60,7 +63,6 @@ SYSTEMD_SERVICE_${PN} = "named.service"
PARALLEL_MAKE = ""
-RDEPENDS_${PN} = "python3-core"
RDEPENDS_${PN}-dev = ""
PACKAGE_BEFORE_PN += "${PN}-utils"meta/recipes-connectivity/bind/bind_9.10.6.bb +0
-0@@ -88,7 +90,11 @@ do_install_append() {install -d "${D}${sysconfdir}/init.d"
install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/" install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind"meta/recipes-connectivity/bind/bind_9.10.6.bb +0
-1- sed -i -e '1s,#!.*python3,#! /usr/bin/python3,'${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds
meta/recipes-connectivity/bind/bind_9.10.6.bb +2
-0+ + if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'python','python', '', d)}" ]; then
meta/recipes-connectivity/bind/bind_9.10.6.bb +2
-0+ sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' \ + ${D}${sbindir}/dnssec-coverage${D}${sbindir}/dnssec-checkds
meta/recipes-connectivity/bind/bind_9.10.6.bb do_install_append() { · line 97
Quoted 1 line
meta/recipes-connectivity/bind/bind_9.10.6.bb +1
-0+ fi
Rather than having a broken file, shouldn't it be deleted in the "no python" case?
Cheers,
Richard
Re: [PATCH] bind: add packageconfig for python-support
Quoted 58 lines · Richard Purdie
Quoted 57 lines · Martin Hundebøll
Break the hard runtime dependency on python3-core by adding a (default-on) packageconfig option for python.
Signed-off-by Martin Hundebøll <[email protected]>--- meta/recipes-connectivity/bind/bind_9.10.6.bb | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)meta/recipes-connectivity/bind/bind_9.10.6.bb +2
-2@@ -38,16 +38,19 @@ EXTRA_OECONF = " ${ENABLE_IPV6} --with-libtool -- enable-threads \ --with-openssl=${STAGING_LIBDIR}/.. \ " -inherit autotools update-rc.d systemd useradd pkgconfig python3-dir +inherit autotools update-rc.d systemd useradd pkgconfig export PYTHON_SITEPACKAGES_DIR # PACKAGECONFIGs readline and libedit should NOT be set at same time -PACKAGECONFIG ?= "readline" +PACKAGECONFIG ?= "readline python" PACKAGECONFIG[httpstats] = "--with-libxml2,--without-libxml2,libxml2"
PACKAGECONFIG[readline] = "--with-readline=-lreadline,,readline" PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit" PACKAGECONFIG[urandom] = "--with-randomdev=/dev/urandom,--with-
randomdev=/dev/random,,"
+PACKAGECONFIG[python] = "--with-python=${PYTHON},--without- python,python3-core,python3-core"meta/recipes-connectivity/bind/bind_9.10.6.bb +2
-0+ +inherit ${@bb.utils.contains('PACKAGECONFIG', 'python','python3native', '', d)}
USERADD_PACKAGES = "${PN}"
USERADD_PARAM_${PN} = "--system --home ${localstatedir}/cache/bind
--no-create-home \meta/recipes-connectivity/bind/bind_9.10.6.bb +0
-2@@ -60,7 +63,6 @@ SYSTEMD_SERVICE_${PN} = "named.service" PARALLEL_MAKE = "" -RDEPENDS_${PN} = "python3-core" RDEPENDS_${PN}-dev = "" PACKAGE_BEFORE_PN += "${PN}-utils"@@ -88,7 +90,11 @@ do_install_append() { install -d "${D}${sysconfdir}/init.d" install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/" install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind" - sed -i -e '1s,#!.*python3,#! /usr/bin/python3,'${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds
meta/recipes-connectivity/bind/bind_9.10.6.bb +2
-0+ + if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'python',
Quoted 8 lines
meta/recipes-connectivity/bind/bind_9.10.6.bb do_install_append() { · line 97
Quoted 5 lines
'python', '', d)}" ]; then
meta/recipes-connectivity/bind/bind_9.10.6.bb +2
-0+ sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' \ + ${D}${sbindir}/dnssec-coverage${D}${sbindir}/dnssec-checkds
meta/recipes-connectivity/bind/bind_9.10.6.bb +1
-0+ fiRather than having a broken file, shouldn't it be deleted in the "no python" case?
Bind is clever enough to avoid installing it in that case...
// Martin
Re: [PATCH] bind: add packageconfig for python-support
In reply to Martin HundebøllPing
Quoted 56 lines · Martin Hundebøll
Break the hard runtime dependency on python3-core by adding a (default-on) packageconfig option for python.
Signed-off-by Martin Hundebøll <[email protected]>--- meta/recipes-connectivity/bind/bind_9.10.6.bb | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)meta/recipes-connectivity/bind/bind_9.10.6.bb +10
-4@@ -38,16 +38,19 @@ EXTRA_OECONF = " ${ENABLE_IPV6} --with-libtool --enable-threads \ --with-openssl=${STAGING_LIBDIR}/.. \ " -inherit autotools update-rc.d systemd useradd pkgconfig python3-dir +inherit autotools update-rc.d systemd useradd pkgconfig export PYTHON_SITEPACKAGES_DIR # PACKAGECONFIGs readline and libedit should NOT be set at same time -PACKAGECONFIG ?= "readline" +PACKAGECONFIG ?= "readline python" PACKAGECONFIG[httpstats] = "--with-libxml2,--without-libxml2,libxml2" PACKAGECONFIG[readline] = "--with-readline=-lreadline,,readline" PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit" PACKAGECONFIG[urandom] = "--with-randomdev=/dev/urandom,--with-randomdev=/dev/random,," +PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3-core,python3-core" + +inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)} USERADD_PACKAGES = "${PN}" USERADD_PARAM_${PN} = "--system --home ${localstatedir}/cache/bind --no-create-home \@@ -60,7 +63,6 @@ SYSTEMD_SERVICE_${PN} = "named.service" PARALLEL_MAKE = "" -RDEPENDS_${PN} = "python3-core" RDEPENDS_${PN}-dev = "" PACKAGE_BEFORE_PN += "${PN}-utils"@@ -88,7 +90,11 @@ do_install_append() { install -d "${D}${sysconfdir}/init.d" install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/" install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind" - sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' ${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds + + if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}" ]; then + sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' \ + ${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds + fi # Install systemd related files install -d ${D}${sbindir}
Re: [PATCH] bind: add packageconfig for python-support
Did you test this?
+PACKAGECONFIG[python] = "--with-python=${PYTHON},-- without-python,python3-core,python3-core"
python3-core isn't a recipe so if Python is enabled:
ERROR: Nothing PROVIDES 'python3-core' (but /home/ross/Yocto/poky/meta/recipes-connectivity/bind/bind_9.10.6.bb DEPENDS on or otherwise requires it).
Ross
Quoted 68 lines · Martin Hundebøll
Ping
Quoted 57 lines · Martin Hundebøll
Break the hard runtime dependency on python3-core by adding a (default-on) packageconfig option for python.
Signed-off-by Martin Hundebøll <[email protected]>--- meta/recipes-connectivity/bind/bind_9.10.6.bb | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)meta/recipes-connectivity/bind/bind_9.10.6.bb +2
-2@@ -38,16 +38,19 @@ EXTRA_OECONF = " ${ENABLE_IPV6} --with-libtool --enable-threads \ --with-openssl=${STAGING_LIBDIR}/.. \ " -inherit autotools update-rc.d systemd useradd pkgconfig python3-dir +inherit autotools update-rc.d systemd useradd pkgconfig export PYTHON_SITEPACKAGES_DIR # PACKAGECONFIGs readline and libedit should NOT be set at same time -PACKAGECONFIG ?= "readline" +PACKAGECONFIG ?= "readline python" PACKAGECONFIG[httpstats] = "--with-libxml2,--without-libxml2,libxml2" PACKAGECONFIG[readline] = "--with-readline=-lreadline,,readline" PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit" PACKAGECONFIG[urandom] = "--with-randomdev=/dev/urandom,--with-randomdev=/dev/random,," +PACKAGECONFIG[python] = "--with-python=${PYTHON},--wit hout-python,python3-core,python3-core"
meta/recipes-connectivity/bind/bind_9.10.6.bb +2
-0+ +inherit ${@bb.utils.contains('PACKAGECONFIG', 'python','python3native', '', d)}
USERADD_PACKAGES = "${PN}"USERADD_PARAM_${PN} = "--system --home ${localstatedir}/cache/bind
--no-create-home \meta/recipes-connectivity/bind/bind_9.10.6.bb +0
-1@@ -60,7 +63,6 @@ SYSTEMD_SERVICE_${PN} = "named.service" PARALLEL_MAKE = "" -RDEPENDS_${PN} = "python3-core" RDEPENDS_${PN}-dev = "" PACKAGE_BEFORE_PN += "${PN}-utils"@@ -88,7 +90,11 @@ do_install_append() { install -d "${D}${sysconfdir}/init.d" install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/" install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind" - sed -i -e '1s,#!.*python3,#! /usr/bin/python3,'${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds
meta/recipes-connectivity/bind/bind_9.10.6.bb +2
-0+ + if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'python','python', '', d)}" ]; then
meta/recipes-connectivity/bind/bind_9.10.6.bb +2
-0+ sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' \ + ${D}${sbindir}/dnssec-coverage${D}${sbindir}/dnssec-checkds
+ fi
# Install systemd related files
install -d ${D}${sbindir}Quoted 1 line
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
PATCH v2 1/1 bind: add packageconfig for python-support
From: Martin Hundeboll <[email protected]>
Break the hard runtime dependency on python3-core by adding a (default-on) packageconfig option for python.
---
Changes in v2:
- Remove broken and unneeded build-dependency on python3(-core)
meta/recipes-connectivity/bind/bind_9.10.6.bb | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
meta/recipes-connectivity/bind/bind_9.10.6.bb +10 -4
@@ -38,16 +38,19 @@ EXTRA_OECONF = " ${ENABLE_IPV6} --with-libtool --enable-threads \ --with-openssl=${STAGING_LIBDIR}/.. \ " -inherit autotools update-rc.d systemd useradd pkgconfig python3-dir +inherit autotools update-rc.d systemd useradd pkgconfig export PYTHON_SITEPACKAGES_DIR # PACKAGECONFIGs readline and libedit should NOT be set at same time -PACKAGECONFIG ?= "readline" +PACKAGECONFIG ?= "readline python" PACKAGECONFIG[httpstats] = "--with-libxml2,--without-libxml2,libxml2" PACKAGECONFIG[readline] = "--with-readline=-lreadline,,readline" PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit" PACKAGECONFIG[urandom] = "--with-randomdev=/dev/urandom,--with-randomdev=/dev/random,," +PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,,python3-core" + +inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)} USERADD_PACKAGES = "${PN}" USERADD_PARAM_${PN} = "--system --home ${localstatedir}/cache/bind --no-create-home \
@@ -60,7 +63,6 @@ SYSTEMD_SERVICE_${PN} = "named.service" PARALLEL_MAKE = "" -RDEPENDS_${PN} = "python3-core" RDEPENDS_${PN}-dev = "" PACKAGE_BEFORE_PN += "${PN}-utils"
@@ -88,7 +90,11 @@ do_install_append() { install -d "${D}${sysconfdir}/init.d" install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/" install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind" - sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' ${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds + + if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}" ]; then + sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' \ + ${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds + fi # Install systemd related files install -d ${D}${sbindir}
Signature · 1 line
2.16.2