]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
package.bbclass: hardcode emit_pkgdata to run last
authorAshishKumar Mishra <emailaddress.ashish@gmail.com>
Tue, 14 Jul 2026 05:00:03 +0000 (10:30 +0530)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 16 Jul 2026 10:17:14 +0000 (11:17 +0100)
Ensure emit_pkgdata runs after all PACKAGEFUNCS to allow layers to
extend packaging behavior.
Layers can now append custom functions via PACKAGEFUNCS += "func_name"
and they will run before emit_pkgdata generates package metadata.

Signed-off-by: AshishKumar Mishra <emailaddress.ashish@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-global/package.bbclass

index 30accaeaa9176795d9eb4269ddc695f4271c4783..cb92b49571481c952d70f05df055d42206120a09 100644 (file)
@@ -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)
 }