diff mbox series

meta-poky: Drop sanity class

Message ID 20261112152912.34019-1-richard.purdie@linuxfoundation.org (mailing list archive)
State New
Headers show
Series meta-poky: Drop sanity class | expand

Commit Message

Richard Purdie Nov. 12, 2026, 3:29 p.m. UTC
With bitbake-setup being adopted and now that the poky combo-layer repo is
not longer used, we don't really need this sanity/migration code. Remove
it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta-poky/classes/poky-sanity.bbclass | 46 ---------------------------
 meta-poky/conf/distro/poky.conf       |  2 --
 meta-poky/conf/layer.conf             |  2 --
 3 files changed, 50 deletions(-)
 delete mode 100644 meta-poky/classes/poky-sanity.bbclass
diff mbox series

Patch

diff --git a/meta-poky/classes/poky-sanity.bbclass b/meta-poky/classes/poky-sanity.bbclass
deleted file mode 100644
index a068c7368c1..00000000000
--- a/meta-poky/classes/poky-sanity.bbclass
+++ /dev/null
@@ -1,46 +0,0 @@ 
-# Provide some extensions to sanity.bbclass to handle poky-specific conf file upgrades
-
-python poky_update_bblayersconf() {
-    current_version = int(d.getVar('POKY_BBLAYERS_CONF_VERSION') or -1)
-    latest_version = int(d.getVar('REQUIRED_POKY_BBLAYERS_CONF_VERSION') or -1)
-    if current_version == -1 or latest_version == -1:
-        # one or the other missing => malformed configuration
-        raise NotImplementedError("You need to update bblayers.conf manually for this version transition")
-
-    success = True
-
-    # check for out of date templateconf.cfg file
-    lines = []
-    fn = os.path.join(d.getVar('TOPDIR'), 'conf/templateconf.cfg')
-
-    lines = sanity_conf_read(fn)
-    index, meta_yocto_line = sanity_conf_find_line(r'^meta-yocto/', lines)
-    if meta_yocto_line:
-        lines[index] = meta_yocto_line.replace('meta-yocto', 'meta-poky')
-        with open(fn, "w") as f:
-            f.write(''.join(lines))
-        bb.note("Your conf/templateconf.cfg file was updated from meta-yocto to meta-poky")
-
-    # add any additional layer checks/changes here
-
-    if success:
-        current_version = latest_version
-        bblayers_fn = bblayers_conf_file(d)
-        lines = sanity_conf_read(bblayers_fn)
-        # sanity_conf_update() will erroneously find a match when the var name
-        # is used in a comment, so do our own here. The code below can be
-        # removed when sanity_conf_update() is fixed in OE-Core.
-        #sanity_conf_update(bblayers_fn, lines, 'POKY_BBLAYERS_CONF_VERSION', current_version)
-        index, line = sanity_conf_find_line(r'^POKY_BBLAYERS_CONF_VERSION', lines)
-        lines[index] = 'POKY_BBLAYERS_CONF_VERSION = "%d"\n' % current_version
-        with open(bblayers_fn, "w") as f:
-            f.write(''.join(lines))
-        bb.note("Your conf/bblayers.conf has been automatically updated.")
-    if success:
-        return
-
-    raise NotImplementedError("You need to update bblayers.conf manually for this version transition")
-}
-
-# ensure our function runs after the OE-Core one
-BBLAYERS_CONF_UPDATE_FUNCS += "conf/bblayers.conf:POKY_BBLAYERS_CONF_VERSION:REQUIRED_POKY_BBLAYERS_CONF_VERSION:poky_update_bblayersconf"
diff --git a/meta-poky/conf/distro/poky.conf b/meta-poky/conf/distro/poky.conf
index 76808150677..59395b990f8 100644
--- a/meta-poky/conf/distro/poky.conf
+++ b/meta-poky/conf/distro/poky.conf
@@ -52,8 +52,6 @@  SANITY_TESTED_DISTROS ?= " \
             rocky-9 \n \
             rocky-10 \n \
             "
-# add poky sanity bbclass
-INHERIT += "poky-sanity"
 
 # QA check settings - a little stricter than the OE-Core defaults
 # (none currently necessary as we now match OE-Core)
diff --git a/meta-poky/conf/layer.conf b/meta-poky/conf/layer.conf
index 4a444d31046..a92e635f64c 100644
--- a/meta-poky/conf/layer.conf
+++ b/meta-poky/conf/layer.conf
@@ -16,5 +16,3 @@  LAYERSERIES_COMPAT_yocto = "blacksail"
 LAYERVERSION_yocto = "3"
 
 LAYERDEPENDS_yocto = "core"
-
-REQUIRED_POKY_BBLAYERS_CONF_VERSION = "2"