Skip to contentSkip to conversation

package.bbclass: fix execution order bug in emit_pkgdata

PATCH In review AshishKumar Mishra 3 participants 7 messages Jul 22 – Jul 24

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package.bbclass: fix execution order bug in emit_pkgdata

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)

---
 meta/classes-global/package.bbclass | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta/classes-global/package.bbclass +5 -2
index aa1eb5e901..ffe3ed93ef 100644
@@ -468,8 +468,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
@@ -561,9 +560,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)
 }
 
Signature · 1 line
2.43.0
#2 lore raw
Quoted 6 lines · AshishKumar Mishra via lists.openembedded.org

Hi Yoann ,

This is an bug fix patch which fixes the emit_pkgdata order
The same have been merged in master at https://git.openembedded.org/openembedded-core-contrib/commit/?h=ross/wip/nasm&id=aa85baff9ebdd3f932811c3b43d1918c38373cb9

Request to take this patch in scarthgap

Hello,

This also need backporting to wrynose, right?
If that's the case, please send a cherry-pick request (if trivial) or a backported patch.

Thanks!

Signature · 2 lines
Yoann Congal
Smile ECS
#3 lore raw

Hi Yoann ,

I tested on Scarthgap today and hence shared for it

Will create an patch for Wrynose and share after testing it once.

In meantime, can you please take this in consideration for Scarthgap? Or as an process i should send Wrynose.

So accordingly from next patch onwards, will follow the same.

Thanks ,
Ashish

Quoted 33 lines · Yoann Congal via lists.openembedded.org
Quoted 4 lines · AshishKumar Mishra via lists.openembedded.org

Hi Yoann ,

This is an bug fix patch which fixes the emit_pkgdata order The same have been merged in master at

https://git.openembedded.org/openembedded-core-contrib/commit/?h=ross/wip/nasm&id=aa85baff9ebdd3f932811c3b43d1918c38373cb9

Quoted 2 lines

Request to take this patch in scarthgap

Hello,

This also need backporting to wrynose, right?
If that's the case, please send a cherry-pick request (if trivial) or a backported patch.

Thanks!
--
Yoann Congal
Smile ECS

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#241665):
https://lists.openembedded.org/g/openembedded-core/message/241665
Mute This Topic: https://lists.openembedded.org/mt/120392420/1334323
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#4 lore raw
Quoted 11 lines · Ashish Mishra

Hi Yoann ,

I tested on Scarthgap today and hence shared for it

Will create an patch for Wrynose and share after testing it once.

In meantime, can you please take this in consideration for Scarthgap? Or as an process i should send Wrynose.

So accordingly from next patch onwards, will follow the same.

As a policy, I can't accept a patch for scarthgap if it does not have a wrynose equivalent.
So yes, you should send the wrynose patch. Then, I'll consider this one for scarthgap.

Regards,

Quoted 41 lines

Thanks ,
Ashish

Quoted 33 lines · Yoann Congal via lists.openembedded.org
Quoted 4 lines · AshishKumar Mishra via lists.openembedded.org

Hi Yoann ,

This is an bug fix patch which fixes the emit_pkgdata order The same have been merged in master at

https://git.openembedded.org/openembedded-core-contrib/commit/?h=ross/wip/nasm&id=aa85baff9ebdd3f932811c3b43d1918c38373cb9

Quoted 2 lines

Request to take this patch in scarthgap

Hello,

This also need backporting to wrynose, right?
If that's the case, please send a cherry-pick request (if trivial) or a backported patch.

Thanks!
--
Yoann Congal
Smile ECS

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#241665):
https://lists.openembedded.org/g/openembedded-core/message/241665
Mute This Topic: https://lists.openembedded.org/mt/120392420/1334323
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 2 lines
Yoann Congal
Smile ECS
#5 lore raw

Ok , will work on Wrynose.

Thanks for sharing the details , will take care of this process going ahead

Quoted 69 lines · Yoann Congal
Quoted 11 lines · Ashish Mishra

Hi Yoann ,

I tested on Scarthgap today and hence shared for it

Will create an patch for Wrynose and share after testing it once.

In meantime, can you please take this in consideration for Scarthgap? Or as an process i should send Wrynose.

So accordingly from next patch onwards, will follow the same.

As a policy, I can't accept a patch for scarthgap if it does not have a wrynose equivalent.
So yes, you should send the wrynose patch. Then, I'll consider this one for scarthgap.

Regards,

Quoted 41 lines

Thanks ,
Ashish

Quoted 33 lines · Yoann Congal via lists.openembedded.org
Quoted 4 lines · AshishKumar Mishra via lists.openembedded.org

Hi Yoann ,

This is an bug fix patch which fixes the emit_pkgdata order The same have been merged in master at

https://git.openembedded.org/openembedded-core-contrib/commit/?h=ross/wip/nasm&id=aa85baff9ebdd3f932811c3b43d1918c38373cb9

Quoted 2 lines

Request to take this patch in scarthgap

Hello,

This also need backporting to wrynose, right?
If that's the case, please send a cherry-pick request (if trivial) or a backported patch.

Thanks!
--
Yoann Congal
Smile ECS

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#241665):
https://lists.openembedded.org/g/openembedded-core/message/241665
Mute This Topic: https://lists.openembedded.org/mt/120392420/1334323
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

--
Yoann Congal
Smile ECS