]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
recipetool: Fix inherit in created -native* recipes
authorYoann Congal <yoann.congal@smile.fr>
Wed, 28 Jun 2023 07:10:37 +0000 (09:10 +0200)
committerSteve Sakoman <steve@sakoman.com>
Mon, 31 Jul 2023 18:12:27 +0000 (08:12 -1000)
native and nativesdk classes are special and must be inherited last :
put them at the end of the gathered classes to inherit.

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a6614fd800cbe791264aeb102d379ba79bd145c2)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
scripts/lib/recipetool/create.py

index 220465ed2f48cb4909892bdfc9b4cc5e6cd11257..67894fb4d0fc9ae710ab465b4187ea24c8568918 100644 (file)
@@ -745,6 +745,10 @@ def create_recipe(args):
     for handler in handlers:
         handler.process(srctree_use, classes, lines_before, lines_after, handled, extravalues)
 
+    # native and nativesdk classes are special and must be inherited last
+    # If present, put them at the end of the classes list
+    classes.sort(key=lambda c: c in ("native", "nativesdk"))
+
     extrafiles = extravalues.pop('extrafiles', {})
     extra_pn = extravalues.pop('PN', None)
     extra_pv = extravalues.pop('PV', None)