openembedded-devel.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* [meta-oe][RFC PATCH] libiio: depend on avahi only when network backed is used
@ 2021-10-13  5:34 Nandor Han
  2021-10-13  5:39 ` Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Nandor Han @ 2021-10-13  5:34 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Nandor Han, sam.van.den.berge, raj.khem

The `avahi` dependency is needed only when network backend is used.
The current dependency configuration will add the `avahi` dependency
regardless if network backend is used or not.

Move the `avahi` dependency to be part of `PACKAGECONFIG` configuration
which will insert the dependency only when needed.

Signed-off-by: Nandor Han <nandor.han@vaisala.com>
---

Notes:
    Testing
    -------
    1. Verify that `libiio` recipe builds successfully with or
    without the network backend configured: PASS

 meta-oe/recipes-support/libiio/libiio_git.bb | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/meta-oe/recipes-support/libiio/libiio_git.bb b/meta-oe/recipes-support/libiio/libiio_git.bb
index 6ac534a28..488d4e3b0 100644
--- a/meta-oe/recipes-support/libiio/libiio_git.bb
+++ b/meta-oe/recipes-support/libiio/libiio_git.bb
@@ -18,7 +18,6 @@ DISTUTILS_SETUP_PATH ?= "${B}/bindings/python/"
 
 DEPENDS = " \
     flex-native bison-native libaio \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
 "
 
 inherit cmake python3native systemd setuptools3
@@ -31,8 +30,13 @@ EXTRA_OECMAKE = " \
 
 PACKAGECONFIG ??= "usb_backend network_backend serial_backend"
 
+NETWORK_BACKEND_DEPENDENCIES = "\
+    libxml2 \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
+"
+
 PACKAGECONFIG[usb_backend] = "-DWITH_USB_BACKEND=ON,-DWITH_USB_BACKEND=OFF,libusb1 libxml2"
-PACKAGECONFIG[network_backend] = "-DWITH_NETWORK_BACKEND=ON,-DWITH_NETWORK_BACKEND=OFF,libxml2"
+PACKAGECONFIG[network_backend] = "-DWITH_NETWORK_BACKEND=ON,-DWITH_NETWORK_BACKEND=OFF, ${NETWORK_BACKEND_DEPENDENCIES}"
 PACKAGECONFIG[serial_backend] = "-DWITH_SERIAL_BACKEND=ON,-DWITH_SERIAL_BACKEND=off,libserialport libxml2"
 PACKAGECONFIG[libiio-python3] = "-DPYTHON_BINDINGS=ON,-DPYTHON_BINDINGS=OFF"
 
-- 
2.26.3



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [meta-oe][RFC PATCH] libiio: depend on avahi only when network backed is used
  2021-10-13  5:34 [meta-oe][RFC PATCH] libiio: depend on avahi only when network backed is used Nandor Han
@ 2021-10-13  5:39 ` Khem Raj
  2021-10-13  5:43   ` Nandor Han
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2021-10-13  5:39 UTC (permalink / raw)
  To: Nandor Han; +Cc: openembeded-devel, sam.van.den.berge

this is already applied with
https://git.openembedded.org/meta-openembedded/commit/?id=e078ffd4ce
if we missed anything please send a rebased patch.

On Tue, Oct 12, 2021 at 10:34 PM Nandor Han <nandor.han@vaisala.com> wrote:
>
> The `avahi` dependency is needed only when network backend is used.
> The current dependency configuration will add the `avahi` dependency
> regardless if network backend is used or not.
>
> Move the `avahi` dependency to be part of `PACKAGECONFIG` configuration
> which will insert the dependency only when needed.
>
> Signed-off-by: Nandor Han <nandor.han@vaisala.com>
> ---
>
> Notes:
>     Testing
>     -------
>     1. Verify that `libiio` recipe builds successfully with or
>     without the network backend configured: PASS
>
>  meta-oe/recipes-support/libiio/libiio_git.bb | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/meta-oe/recipes-support/libiio/libiio_git.bb b/meta-oe/recipes-support/libiio/libiio_git.bb
> index 6ac534a28..488d4e3b0 100644
> --- a/meta-oe/recipes-support/libiio/libiio_git.bb
> +++ b/meta-oe/recipes-support/libiio/libiio_git.bb
> @@ -18,7 +18,6 @@ DISTUTILS_SETUP_PATH ?= "${B}/bindings/python/"
>
>  DEPENDS = " \
>      flex-native bison-native libaio \
> -    ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
>  "
>
>  inherit cmake python3native systemd setuptools3
> @@ -31,8 +30,13 @@ EXTRA_OECMAKE = " \
>
>  PACKAGECONFIG ??= "usb_backend network_backend serial_backend"
>
> +NETWORK_BACKEND_DEPENDENCIES = "\
> +    libxml2 \
> +    ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
> +"
> +
>  PACKAGECONFIG[usb_backend] = "-DWITH_USB_BACKEND=ON,-DWITH_USB_BACKEND=OFF,libusb1 libxml2"
> -PACKAGECONFIG[network_backend] = "-DWITH_NETWORK_BACKEND=ON,-DWITH_NETWORK_BACKEND=OFF,libxml2"
> +PACKAGECONFIG[network_backend] = "-DWITH_NETWORK_BACKEND=ON,-DWITH_NETWORK_BACKEND=OFF, ${NETWORK_BACKEND_DEPENDENCIES}"
>  PACKAGECONFIG[serial_backend] = "-DWITH_SERIAL_BACKEND=ON,-DWITH_SERIAL_BACKEND=off,libserialport libxml2"
>  PACKAGECONFIG[libiio-python3] = "-DPYTHON_BINDINGS=ON,-DPYTHON_BINDINGS=OFF"
>
> --
> 2.26.3
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [meta-oe][RFC PATCH] libiio: depend on avahi only when network backed is used
  2021-10-13  5:39 ` Khem Raj
@ 2021-10-13  5:43   ` Nandor Han
  0 siblings, 0 replies; 3+ messages in thread
From: Nandor Han @ 2021-10-13  5:43 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembeded-devel, sam.van.den.berge

On 10/13/21 8:39 AM, Khem Raj wrote:
> this is already applied with
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.openembedded.org%2Fmeta-openembedded%2Fcommit%2F%3Fid%3De078ffd4ce&amp;data=04%7C01%7Cnandor.han%40vaisala.com%7C51fe01b4b06e427adc0108d98e0bec31%7C6d7393e041f54c2e9b124c2be5da5c57%7C0%7C0%7C637697004122220940%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=jwwF6KG2NPti4u5paCHjGal0RXShRJFDax3PW%2BFNmyM%3D&amp;reserved=0
> if we missed anything please send a rebased patch.
> 

Looks good. Doesn't need anything, it was just me failing to find it.

Thanks,
    Nandor


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-13  5:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13  5:34 [meta-oe][RFC PATCH] libiio: depend on avahi only when network backed is used Nandor Han
2021-10-13  5:39 ` Khem Raj
2021-10-13  5:43   ` Nandor Han

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).