diff mbox series

[wrynose] package.bbclass: fix execution order bug in emit_pkgdata

Message ID 20260724102244.2712719-1-emailaddress.ashish@gmail.com
State New
Headers show
Series [wrynose] package.bbclass: fix execution order bug in emit_pkgdata | expand

Commit Message

AshishKumar Mishra July 24, 2026, 10:22 a.m. UTC
emit_pkgdata was previously part of the PACKAGEFUNCS list.
Because other layers and recipes often append custom cleanup or processing
functions to PACKAGEFUNCS , those ended up running after
emit_pkgdata

To fix this, pull emit_pkgdata out of PACKAGEFUNCS and call it explicitly
at the very end of do_package() ensuring it always runs last.

(From OE-Core rev aa85baff9ebdd3f932811c3b43d1918c38373cb9)

Signed-off-by: AshishKumar Mishra <emailaddress.ashish@gmail.com>
---
 meta/classes-global/package.bbclass | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta/classes-global/package.bbclass b/meta/classes-global/package.bbclass
index 67148fc1ac..0d1be442c1 100644
--- a/meta/classes-global/package.bbclass
+++ b/meta/classes-global/package.bbclass
@@ -472,8 +472,7 @@  PACKAGEFUNCS += " \
                 package_do_shlibs \
                 package_do_pkgconfig \
                 read_shlibdeps \
-                package_depchains \
-                emit_pkgdata"
+                package_depchains"
 
 python do_package () {
     # Change the following version to cause sstate to invalidate the package
@@ -564,9 +563,13 @@  python do_package () {
             for file in files:
                 pkgfiles[pkg].append(walkroot + os.sep + file)
 
+
+    # We want emit_pkgdata to run last, after everything
     for f in (d.getVar('PACKAGEFUNCS') or '').split():
         bb.build.exec_func(f, d)
 
+    bb.build.exec_func("emit_pkgdata", d)
+
     oe.qa.exit_if_errors(d)
 }