diff mbox series

python3-scapy: replace all_distro_features() with DISTRO_FEATURES check

Message ID 20260613171301.155306-1-danwalkes@trellis-logic.com
State New
Headers show
Series python3-scapy: replace all_distro_features() with DISTRO_FEATURES check | expand

Commit Message

Dan Walkes June 13, 2026, 5:13 p.m. UTC
python3-scapy uses oe.utils.all_distro_features() in do_install_ptest().

After oe-core commit 28d32a940ff4 ("utils: Remove any/all_distro_features"),
building against current oe-core master fails with:

AttributeError: module 'oe.utils' has no attribute 'all_distro_features'

Replace the call with an equivalent DISTRO_FEATURES check.

This appears to be the only remaining use of all_distro_features() or
any_distro_features() within meta-openembedded.

Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
---
 meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Khem Raj June 13, 2026, 6:57 p.m. UTC | #1
Thanks Dan I am already carrying a similar patch in master-next

On Sat, Jun 13, 2026, 10:13 AM Dan Walkes <danwalkes@trellis-logic.com>
wrote:

> python3-scapy uses oe.utils.all_distro_features() in do_install_ptest().
>
> After oe-core commit 28d32a940ff4 ("utils: Remove
> any/all_distro_features"),
> building against current oe-core master fails with:
>
> AttributeError: module 'oe.utils' has no attribute 'all_distro_features'
>
> Replace the call with an equivalent DISTRO_FEATURES check.
>
> This appears to be the only remaining use of all_distro_features() or
> any_distro_features() within meta-openembedded.
>
> Signed-off-by: Dan Walkes <danwalkes@trellis-logic.com>
> ---
>  meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta-networking/recipes-devtools/python/
> python3-scapy_2.6.1.bb b/meta-networking/recipes-devtools/python/
> python3-scapy_2.6.1.bb
> index 678aec0135..f6087b9b87 100644
> --- a/meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb
> +++ b/meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb
> @@ -42,7 +42,7 @@ do_install_ptest() {
>      # note1: if ipv6 isn't enabled, skip the related test (add '-K ipv6'
> argument)
>      # note2: to make this test work, your ISP also must support ipv6 -
> the test is trying
>      #        to ping google.com through ipv6.
> -    if [ "${@oe.utils.all_distro_features(d, 'ipv6', 'true', 'false')}" =
> "false" ]; then
> +    if [ "${@bb.utils.contains("DISTRO_FEATURES", 'ipv6', 'true',
> 'false', d)}" = "false" ]; then
>          sed -i 's/UTscapy.py/UTscapy.py -K ipv6/g'
> ${D}${PTEST_PATH}/run-ptest
>      fi
>  }
> --
> 2.43.0
>
>
diff mbox series

Patch

diff --git a/meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb b/meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb
index 678aec0135..f6087b9b87 100644
--- a/meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb
+++ b/meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb
@@ -42,7 +42,7 @@  do_install_ptest() {
     # note1: if ipv6 isn't enabled, skip the related test (add '-K ipv6' argument)
     # note2: to make this test work, your ISP also must support ipv6 - the test is trying
     #        to ping google.com through ipv6.
-    if [ "${@oe.utils.all_distro_features(d, 'ipv6', 'true', 'false')}" = "false" ]; then
+    if [ "${@bb.utils.contains("DISTRO_FEATURES", 'ipv6', 'true', 'false', d)}" = "false" ]; then
         sed -i 's/UTscapy.py/UTscapy.py -K ipv6/g' ${D}${PTEST_PATH}/run-ptest
     fi
 }