Openembedded Core Discussions
 help / color / mirror / Atom feed
From: pmi183@gmail.com
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] buildhistory: Fix do_package race issues
Date: Wed, 15 May 2024 02:36:34 -0700	[thread overview]
Message-ID: <22166.1715765794274311096@lists.openembedded.org> (raw)
In-Reply-To: <CANNYZj-uDz_gCpvkb5F9R6NkkQVGn768=mHXyvZJPHfKyZ-t2g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1464 bytes --]

Hi Alex,

I did some investigation on this topic,

- why is it not a hard error?

That is because find command in `buildhistory_list_pkg_files` is tested inside the loop for, hiding this issue and for loop is always returning 0 even if `find` fails.

> 
> .....
> buildhistory_list_pkg_files() {
> # Create individual files-in-package for each recipe's package
> pkgdirlist=$(find ${PKGDEST}/* -maxdepth 0 -type d)
> 
> for pkgdir in pkgdirlist; do
> .....
> 

- why is it unable to find anything in packages-split/, if it executes after populate_packages which places things there?

As far as i could understand, there is some concurrency issue between package.bbclass and buildhistory.bbclass. Taking in consideration that `buildhistory_list_pkg_files` is triggered by checking if `BB_CURRENTTASK` is `package` and at the same time `PACKAGESPLITFUNCS` is triggered on `do_package`, this leads to the issue with missing files since buildhistory bbclass might be looking into something that wasnt yet created. In my findings, `buildhistory_list_pkg_files` should be called in the end of `do_package` execution where `packages-split` directory is created and populated.

Is there any clear reason why we cant move `buildhistory_list_pkg_files` to `packagedata` task since its the next task to be executed?

Any suggestion or any idea how can i, from buildhistory.bbclass, determine if `PACKAGESPLITFUNCS` was already executed?

Thank you

[-- Attachment #2: Type: text/html, Size: 4663 bytes --]

  reply	other threads:[~2024-05-15  9:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 13:59 [PATCH] buildhistory: Fix do_package race issues Richard Purdie
2021-11-23 14:19 ` [OE-core] " Alexander Kanavin
2024-05-13  9:47 ` pmi183
2024-05-13  9:51   ` [OE-core] " Alexander Kanavin
2024-05-13 10:05     ` pmi183
2024-05-13 11:01       ` [OE-core] " Alexander Kanavin
2024-05-15  9:36         ` pmi183 [this message]
2024-05-15 10:07           ` Alexander Kanavin
2024-05-20  8:10             ` pmi183
2024-05-20 11:12               ` [OE-core] " Jose Quaresma
2024-05-21 10:24               ` Alexander Kanavin
2024-05-23 15:24                 ` pmi183
2024-05-23 15:24                   ` pmi183
     [not found]                   ` <Groupsio.1.30216.1716477852755796076@lists.openembedded.org>
2024-05-24  8:13                     ` [OE-core] " Alexander Kanavin
2024-05-29  8:56                       ` pmi183
2024-05-29  9:01                       ` pmi183
2024-05-29 10:22                         ` [OE-core] " Alexander Kanavin
2024-05-29 11:57                           ` pmi183
2024-05-29 12:17                             ` [OE-core] " Alexander Kanavin
2024-05-29 22:35                               ` Richard Purdie

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=22166.1715765794274311096@lists.openembedded.org \
    --to=pmi183@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