public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] classes/yocto-check-layer: allow to explicitly skip check_network_flag in recipe
@ 2026-02-27  7:21 Hongxu Jia
  2026-02-27  9:39 ` [OE-core] " Jose Quaresma
  0 siblings, 1 reply; 5+ messages in thread
From: Hongxu Jia @ 2026-02-27  7:21 UTC (permalink / raw)
  To: openembedded-core

The yocto-check-layer add a new test that checks that no tasks
between do_fetch (exclusive) and do_build (inclusive) are allowed
to use the network, with rare exceptions.

The only exception currently is build-appliance-image's do_image task,
which is hardcoded in yocto-check-layer bbclass.

This commit adds variable SKIP_CHECK_NETWORK_FLAG to allow user to
explicitly skip check_network_flag in recipe

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta/classes-global/yocto-check-layer.bbclass | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/meta/classes-global/yocto-check-layer.bbclass b/meta/classes-global/yocto-check-layer.bbclass
index ba93085325..9fb36f5646 100644
--- a/meta/classes-global/yocto-check-layer.bbclass
+++ b/meta/classes-global/yocto-check-layer.bbclass
@@ -27,13 +27,16 @@ def check_insane_skip(d):
             d.setVar("QA_ERRORS_FOUND", "True")
 
 
+# Format: "BPN1:task1 BPN2:task2", separate by space
+# build-appliance-image uses pip at image time
+SKIP_CHECK_NETWORK_FLAG = "build-appliance-image:do_image"
+
 # Check that no tasks (with rare exceptions) between do_fetch and do_build
 # use the network.
 def check_network_flag(d):
     # BPN:task names that are allowed to reach the network, using fnmatch to compare.
     allowed = []
-    # build-appliance-image uses pip at image time
-    allowed += ["build-appliance-image:do_image"]
+    allowed += (d.getVar('SKIP_CHECK_NETWORK_FLAG') or '').split()
 
     def is_allowed(bpn, task):
         from fnmatch import fnmatch
-- 
2.34.1



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

end of thread, other threads:[~2026-03-02  2:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-27  7:21 [PATCH] classes/yocto-check-layer: allow to explicitly skip check_network_flag in recipe Hongxu Jia
2026-02-27  9:39 ` [OE-core] " Jose Quaresma
2026-02-28  3:27   ` Hongxu Jia
2026-02-28 10:50     ` Richard Purdie
2026-03-02  2:15       ` Hongxu Jia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox