[OE-core] [PATCH v2] connman: fix systemd support for connman-* packages.

Saul Wold sgw at linux.intel.com
Tue Aug 13 15:30:55 UTC 2013


On 08/13/2013 04:26 AM, Yevhen Kyriukha wrote:
> This patch fixes systemd's postinst/postrm script generation.
>
> Signed-off-by: Yevhen Kyriukha <kirgene at gmail.com>
> ---
>   meta/recipes-connectivity/connman/connman.inc | 8 ++++++++
>   1 file changed, 8 insertions(+)
>
> diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
> index 6b5ea0b..37ce3ec 100644
> --- a/meta/recipes-connectivity/connman/connman.inc
> +++ b/meta/recipes-connectivity/connman/connman.inc
> @@ -56,6 +56,14 @@ PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls,"
>   INITSCRIPT_NAME = "connman"
>   INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ."
>
> +python __anonymous () {
> +    systemd_packages = "${PN}"
> +    pkgconfig = d.getVar('PACKAGECONFIG', True)
> +    if ('openvpn' or 'vpnc' or 'l2tp' or 'pptp') in pkgconfig.split():
> +        systemd_packages += " ${PN}-vpn"
> +    d.setVar('SYSTEMD_PACKAGES', systemd_packages)
> +}
> +
>   SYSTEMD_SERVICE_${PN} = "connman.service"
>   SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service"
>   SYSTEMD_WIRED_SETUP = "ExecStartPre=-${libdir}/connman/wired-setup"
>
Can't you use the base_contains style of anon python in the 
SYSTEMD_PACKAGES:

SYSTEMD_PACKAGES = "${PN} ${@base_contains('PACKAGECONFIG', 'vpn', 
'${PN}-vpn', '', d)}"

Or can any one of those in the list above trigger the vpn, it would be 
cleaner if we just trigger on just one item.

Sau!



More information about the Openembedded-core mailing list