Skip to contentSkip to conversation

python3-scapy: Replace oe.utils.all_distro_featuresc with bb.utils.contains

PATCH In review Khem Raj 3 participants 4 messages Jun 9 – Jun 12

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 python3-scapy: Replace oe.utils.all_distro_featuresc with bb.utils.contains

oe.utils.all_distro_features is being removed.

---
 meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb +1 -1
index 678aec0135..fac14221c5 100644
@@ -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
 }
#1 lore raw
Quoted 17 lines · Khem Raj via lists.openembedded.org

oe.utils.all_distro_features is being removed.

---
 meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb +1 -1
index 678aec0135..fac14221c5 100644
@@ -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
Quoted 3 lines

         sed -i 's/UTscapy.py/UTscapy.py -K ipv6/g' ${D}${PTEST_PATH}/run-ptest fi
 }

Thanks, I was going to write that patch after your report but you beat me too it!

Cheers,

Richard

#2 lore raw
Quoted 15 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Richard Purdie via lists.openembedded.org
Sent: den 10 juni 2026 11:53
To: [email protected]; [email protected]
Cc: Khem Raj <[email protected]>
Subject: Re: [oe] [meta-networking][PATCH] python3-scapy: Replace oe.utils.all_distro_featuresc with bb.utils.contains

Quoted 7 lines · Khem Raj via lists.openembedded.org

oe.utils.all_distro_features is being removed.

---
 meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 10 lines

meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb do_install_ptest() { · line 45

Quoted 10 lines
meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb +1 -1
index 678aec0135..fac14221c5 100644
@@ -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

For the record, that can be simplified to:

    if [ -z "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" ]; then
Quoted 10 lines
Quoted 3 lines

         sed -i 's/UTscapy.py/UTscapy.py -K ipv6/g' ${D}${PTEST_PATH}/run-ptest fi
 }

Thanks, I was going to write that patch after your report but you beat me too it!

Cheers,

Richard

//Peter

author
#3 lore raw
Quoted 32 lines · Peter Kjellerstedt
Quoted 2 lines

-----Original Message-----
From: [email protected] <

[email protected]> On Behalf Of Richard Purdie via lists.openembedded.org

Quoted 4 lines

Sent: den 10 juni 2026 11:53
To: [email protected]; [email protected]
Cc: Khem Raj <[email protected]>
Subject: Re: [oe] [meta-networking][PATCH] python3-scapy: Replace

oe.utils.all_distro_featuresc with bb.utils.contains

Quoted 2 lines

On Tue, 2026-06-09 at 07:48 -0700, Khem Raj via lists.openembedded.org

Quoted 8 lines · wrote:

Review

Quoted 8 lines

oe.utils.all_distro_features is being removed.

---
 meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

python3-scapy_2.6.1.bb b/meta-networking/recipes-devtools/python/ python3-scapy_2.6.1.bb

Quoted 5 lines

meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb do_install_ptest() { · line 42

Quoted 5 lines

index 678aec0135..fac14221c5 100644

meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb +0 -0
@@ -42,7 +42,7 @@ do_install_ptest() {
     # note1: if ipv6 isn't enabled, skip the related test (add '-K

ipv6' argument)

Quoted 1 line

meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb do_install_ptest() { · line 43

Quoted 1 line
meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb +0 -0
     # note2: to make this test work, your ISP also must support ipv6

- the test is trying

Quoted 2 lines

meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb do_install_ptest() { · line 45

Quoted 2 lines
meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb +0 -1
     #        to ping google.com through ipv6.
-    if [ "${@oe.utils.all_distro_features(d, 'ipv6', 'true',
Quoted 9 lines

'false')}" = "false" ]; then

Quoted 1 line

meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb do_install_ptest() { · line 45

Quoted 1 line
meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb +1 -0
+    if [ "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'true',

'false', d)}" = "false" ]; then

For the record, that can be simplified to:

    if [ -z "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" ]; then

I have taken this suggestion.

Quoted 16 lines
Quoted 1 line

meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb do_install_ptest() { · line 46

Quoted 1 line
meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb +0 -0
         sed -i 's/UTscapy.py/UTscapy.py -K ipv6/g'

${D}${PTEST_PATH}/run-ptest

Quoted 4 lines

meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb do_install_ptest() { · line 48

Quoted 2 lines
meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb +0 -0
     fi
 }

Thanks, I was going to write that patch after your report but you beat

me

Quoted 5 lines

too it!

Cheers,

Richard

//Peter