From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: "Martin Hundebøll" <mnhu@prevas.dk>,
OE-core <openembedded-core@lists.openembedded.org>
Cc: Armin Kuster <akuster@mvista.com>
Subject: Re: [PATCH] bind: add packageconfig for python-support
Date: Mon, 05 Feb 2018 12:49:10 +0000 [thread overview]
Message-ID: <1517834950.3090.80.camel@linuxfoundation.org> (raw)
In-Reply-To: <20180205122544.27223-2-mnhu@prevas.dk>
On Mon, 2018-02-05 at 13:25 +0100, Martin Hundebøll wrote:
> Break the hard runtime dependency on python3-core by adding a
> (default-on) packageconfig option for python.
>
> Signed-off-by: Martin Hundebøll <mnhu@prevas.dk>
> ---
> meta/recipes-connectivity/bind/bind_9.10.6.bb | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/meta/recipes-connectivity/bind/bind_9.10.6.bb
> b/meta/recipes-connectivity/bind/bind_9.10.6.bb
> index 8b8835ba80..2ec7ab44f0 100644
> --- a/meta/recipes-connectivity/bind/bind_9.10.6.bb
> +++ b/meta/recipes-connectivity/bind/bind_9.10.6.bb
> @@ -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
Rather than having a broken file, shouldn't it be deleted in the "no
python" case?
Cheers,
Richard
next prev parent reply other threads:[~2018-02-05 12:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-05 12:25 [PATCH] usbutils: Split out lsusb.py Martin Hundebøll
2018-02-05 12:25 ` [PATCH] bind: add packageconfig for python-support Martin Hundebøll
2018-02-05 12:49 ` Richard Purdie [this message]
2018-02-05 12:51 ` Martin Hundebøll
2018-02-13 6:21 ` Martin Hundebøll
2018-02-21 14:22 ` Burton, Ross
2018-02-22 13:40 ` [PATCH v2] " Martin Hundebøll
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1517834950.3090.80.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=akuster@mvista.com \
--cc=mnhu@prevas.dk \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.