Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Jacob Kroon <jacob.kroon@gmail.com>
To: Jose Quaresma <quaresma.jose@gmail.com>,
	openembedded-core@lists.openembedded.org
Cc: ricardo@foundries.io, Jose Quaresma <jose.quaresma@foundries.io>
Subject: Re: [OE-core][PATCH] kernel.bbclass: Add shared_workdir_prepare task
Date: Tue, 2 Aug 2022 18:19:47 +0200	[thread overview]
Message-ID: <5eca86e2-e690-3547-c35a-624fe2afc6b2@gmail.com> (raw)
In-Reply-To: <20220720113043.196185-1-jose.quaresma@foundries.io>

On 7/20/22 13:30, Jose Quaresma wrote:
> The task do_compile_kernelmodules runs after the shared_workdir and
> is installing some files in STAGING_KERNEL_BUILDDIR, this can races
> in other recipes that depends on "virtual/kernel:do_shared_workdir"
> as the STAGING_KERNEL_BUILDDIR is not fully populated when the
> shared_workdir task ends.
> 
> To address this issue a new task is added in place of the previows one
> so the shared_workdir will run after the do_compile_kernelmodules and
> the new shared_workdir_prepare will replce of the old shared_workdir.
> 
> Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
> ---
>   meta/classes/kernel.bbclass | 11 +++++++++--
>   1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 5d2f17c3be..5558769c92 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -504,7 +504,8 @@ do_kernel_version_sanity_check() {
>   	exit 0
>   }
>   
> -addtask shared_workdir after do_compile before do_compile_kernelmodules
> +addtask shared_workdir_prepare after do_compile before do_compile_kernelmodules
> +addtask shared_workdir after do_compile_kernelmodules
>   addtask shared_workdir_setscene
>   
>   do_shared_workdir_setscene () {
> @@ -520,10 +521,16 @@ emit_depmod_pkgdata() {
>   
>   PACKAGEFUNCS += "emit_depmod_pkgdata"
>   
> -do_shared_workdir[cleandirs] += " ${STAGING_KERNEL_BUILDDIR}"
>   do_shared_workdir () {
>   	cd ${B}
>   
> +	kerneldir=${STAGING_KERNEL_BUILDDIR}
> +}

Does the above do anything actually useful ? I thought neither the 
current workdir or a variable set in a shell function would be preserved 
for the next task ?

> +
> +do_shared_workdir_prepare[cleandirs] += " ${STAGING_KERNEL_BUILDDIR}"
> +do_shared_workdir_prepare () {
> +	cd ${B}
> +
>   	kerneldir=${STAGING_KERNEL_BUILDDIR}
>   	install -d $kerneldir
>   

Jacob


  reply	other threads:[~2022-08-02 16:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-20 11:30 [OE-core][PATCH] kernel.bbclass: Add shared_workdir_prepare task Jose Quaresma
2022-08-02 16:19 ` Jacob Kroon [this message]
2022-08-03 11:28   ` Jose Quaresma
2022-09-07  2:34 ` Bruce Ashfield

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=5eca86e2-e690-3547-c35a-624fe2afc6b2@gmail.com \
    --to=jacob.kroon@gmail.com \
    --cc=jose.quaresma@foundries.io \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=quaresma.jose@gmail.com \
    --cc=ricardo@foundries.io \
    /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