This class is very old and not used anywhere in core or meta-oe. Is it still useful? What prompted you to look at it? Should we rather move useful checks to actual qa classes/libraries?
Alex On Thu, 20 Aug 2026 at 02:22, Dmitry Baryshkov via lists.openembedded.org <[email protected]> wrote: > > Any build inheriting recipe_sanity fails during base configuration > parsing with: > > TypeError: recipe_sanity_eh.<locals>.myrename() got an unexpected > keyword argument 'recurse' > > recipe_sanity_eh() replaces bb.data_smart.DataSmart.renameVar() with its > own wrapper in order to record variable renames. The wrapper hardcoded > the signature as (self, key, newkey), so it broke as soon as bitbake > grew a new parameter: renameVar() gained a 'recurse' argument and > bb.data.expandKeys() now passes recurse=False, which the wrapper cannot > accept. As expandKeys() is called while hashing the base datastore, this > kills the build before a single recipe is parsed. > > Forward any extra positional and keyword arguments to the original > renameVar() instead of enumerating them, so the wrapper stays working > across future signature changes as well. > > Fixes: a3c6a020da9a ("data: Fix expandKeys recursion issue") > Assisted-by: Claude:claude-opus-5 > Signed-off-by: Dmitry Baryshkov <[email protected]> > --- > meta/classes/recipe_sanity.bbclass | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/meta/classes/recipe_sanity.bbclass > b/meta/classes/recipe_sanity.bbclass > index a5cc4315fb86..cd35ed6a1302 100644 > --- a/meta/classes/recipe_sanity.bbclass > +++ b/meta/classes/recipe_sanity.bbclass > @@ -141,9 +141,9 @@ python recipe_sanity_eh () { > # Sick, very sick.. > from bb.data_smart import DataSmart > old = DataSmart.renameVar > - def myrename(self, key, newkey): > + def myrename(self, key, newkey, *args, **kwargs): > oldvalue = self.getVar(newkey, 0) > - old(self, key, newkey) > + old(self, key, newkey, *args, **kwargs) > newvalue = self.getVar(newkey, 0) > if oldvalue: > renames = self.getVar("__recipe_sanity_renames", 0) or set() > -- > 2.47.3 > > > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#243821): https://lists.openembedded.org/g/openembedded-core/message/243821 Mute This Topic: https://lists.openembedded.org/mt/120839376/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
