On Thu, 2026-06-18 at 13:40 +0530, Ashish Mishra via lists.openembedded.org 
wrote:
> From: AshishKumar Mishra <[email protected]>
> 
> This patch adds a new hook point PACKAGE_POSTPROCESS_FUNCS to
> package.bbclass, inserted into PACKAGEFUNCS immediately before
> emit_pkgdata.
> 
> PACKAGE_PREPROCESS_FUNCS comes in picture before the per-package file split,
> so at that point the final file lists are not yet available.
> There is no existing hook that fires after the split with the ability to still
> modify package scripts postinst
> 
> The primary use case driving this patch is SELinux context labeling
> SELinux labels must be applied on the target via a postinst script
> That script must know exactly which files are in the package but this is
> only available after the split.
> This hook enables a bbclass to auto-generate per-package postinst
> scripts containing targeted chcon/restorecon calls
> This helps while getting proper selinux context to files if package
> is updated on target while incremental update scenarios
> 
> There can be other user defined usage if the hook is available
> The change is small 2 lines and entirely non-breaking as the variable
> defaults to "" so all existing builds are unaffected

The trouble is that this is only going to work as long as it is only
your use case using this function name. As soon as someone else decides
their function should be last, it will break your use case.

I guess we could hardcode the emit_pkgdata which would give you access
to the end of the list of functions?

Cheers,

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

Reply via email to