diff mbox series

[2/4] sanity: Add check for old wks/wic paths

Message ID 20260405144311.3734472-2-richard.purdie@linuxfoundation.org
State Accepted, archived
Commit 07e410600c41103098b670f12abe87f64419a624
Headers show
Series [1/4] image_types_wic: Add files/wic to the search path for wks files | expand

Commit Message

Richard Purdie April 5, 2026, 2:43 p.m. UTC
To allow us to clean up the old wic/wks search paths and standardise, detect the
old locations and show the user a sanity check error if they exist.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes-global/sanity.bbclass | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/meta/classes-global/sanity.bbclass b/meta/classes-global/sanity.bbclass
index 2e486966a93..1a490f8d618 100644
--- a/meta/classes-global/sanity.bbclass
+++ b/meta/classes-global/sanity.bbclass
@@ -839,6 +839,13 @@  def check_sanity_version_change(status, d):
         "An error occurred during checking the C++ toolchain for '--std=gnu++20' support. "
         "Please use a g++ compiler that supports C++20 (e.g. g++ version 10 onwards)."))
 
+    # Check there aren't obsolete wic/wks directories
+    for component in d.getVar("BBPATH").split(":") + d.getVar("BBLAYERS").split():
+        for subcomponent in ['wic', 'scripts/lib/wic/canned-wks']:
+            testpath = os.path.join(component, subcomponent)
+            if os.path.exists(testpath):
+                status.addresult("wic/wks files at %s need to be moved to files/wic within the layer to be found/used\n" % testpath)
+
 def sanity_check_locale(d):
     """
     Currently bitbake switches locale to en_US.UTF-8 so check that this locale actually exists.