Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: emailaddress.ashish@gmail.com, openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][master][PATCH] package.bbclass: add PACKAGE_POSTPROCESS_FUNCS hook
Date: Mon, 29 Jun 2026 07:29:38 +0100	[thread overview]
Message-ID: <993e8d27ed255ee05dcdcf27b24a9fdd765c6ef3.camel@linuxfoundation.org> (raw)
In-Reply-To: <20260618081020.86040-1-emailaddress.ashish@gmail.com>

On Thu, 2026-06-18 at 13:40 +0530, Ashish Mishra via lists.openembedded.org wrote:
> From: AshishKumar Mishra <emailaddress.ashish@gmail.com>
> 
> 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


      parent reply	other threads:[~2026-06-29  6:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-18  8:10 [OE-core][master][PATCH] package.bbclass: add PACKAGE_POSTPROCESS_FUNCS hook AshishKumar Mishra
2026-06-19  6:33 ` [master][PATCH] " AshishKumar Mishra
2026-06-29  5:14   ` AshishKumar Mishra
2026-06-29  6:29 ` Richard Purdie [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=993e8d27ed255ee05dcdcf27b24a9fdd765c6ef3.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=emailaddress.ashish@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox