Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Alexander Kanavin <alex.kanavin@gmail.com>,
	"chris.laplante@agilent.com" <chris.laplante@agilent.com>
Cc: openembedded-architecture
	<openembedded-architecture@lists.openembedded.org>,
	Yocto-mailing-list <yocto@lists.yoctoproject.org>,
	",openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>,
	Julien STEPHAN <jstephan@baylibre.com>
Subject: Re: [Openembedded-architecture] Core workflow: sstate for all, bblock/bbunlock, tools for why is sstate not being reused?
Date: Fri, 22 Sep 2023 11:42:31 +0100	[thread overview]
Message-ID: <24b60007a669d075fa1e4ccd18980ada93714c7a.camel@linuxfoundation.org> (raw)
In-Reply-To: <CANNYZj8eSZZOfPGYCdYPrWjHf74dmRW5uYAZfTBp7JemPXxQCg@mail.gmail.com>

On Fri, 2023-09-22 at 11:17 +0200, Alexander Kanavin wrote:
> On Thu, 21 Sept 2023 at 16:39, chris.laplante@agilent.com
> <chris.laplante@agilent.com> wrote:
> 
> > That is very impressive and I'd also love to hear about what heuristics it uses.
> 
> It's actually rather simple. It uses glob.glob on stamps in tmp/, then
> on local sstate to find possible matches, then sorts them by mtime and
> takes the most recent. It's what would work most of the time, but we
> could add printdiff-all (print difference with all sstate matches) or
> printdiff-N (N most recent). It also could abstain from dumping
> locked-sigs.inc into cwd with both -S none and -S printdiff, unless
> explicitly asked
> 
> I just discovered there's also scripts/bitbake-whatchanged (that
> hasn't seen activity in years and is neither documented nor tested).
> Unsurprisingly then, it doesn't work in the same scenario:
> 
> ================
> alex@Zen2:/srv/storage/alex/yocto/build-sstate$ bitbake-whatchanged
> libsolv-native
> Figuring out the STAMPS_DIR ...
> Generating the new stamps ... (need several minutes)
> 
> === Summary: (0 changed, 0 unchanged)
> Newly added: 0
> PV changed: 0
> PR changed: 0
> Dependencies changed: 0
> 
> Removing the newly generated stamps dir ...
> ================
> 
> Maybe this is what RP was referring to when he said the tools don't
> work properly?

No, I've believed that should probably be removed. I think there was a
recent change to it.

I think we had a major step change in this functionality working when
this was fixed:

https://git.yoctoproject.org/poky/commit/?id=84a7485025dd4473403b8da36a0c979a3afd5e93

and this test case was added:

https://git.yoctoproject.org/poky/commit/?id=1bdcd76d2968c3cc6ec2815afceba1cf98efd6d5

Things which used to be problematic:

a) changes involving changes to gcc-source since it uses a shared
sources stamps which confused the tools (at least used to). That may
have been before gcc-source became a recipe?
b) changes to a very common component (e.g. autoconf-native's
do_configure) which make it hard to understand where the root cause of
the changes came from
c) changes which affect many recipes at once, e.g. the do_configure
function in base.bbclass

It might be helpful to write test cases for the scenario you showed as
working above and some of the ones I mention above, then we can
document they work and have an easier way to add tests for issues
if/as/when we identify the problematic scenarios in future.

As you mention, it also uses mtime so perhaps issues happen if you run
a different build, then try and go back to the other config? I suspect
once you understand the algorithm the code uses, you can pick holes in
it.

Cheers,

Richard





  reply	other threads:[~2023-09-22 10:42 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-12 14:44 Yocto Project Status 12 September 2023 (WW37) Stephen K Jolley
2023-09-14 11:52 ` Core workflow: sstate for all, bblock/bbunlock, tools for why is sstate not being reused? Alexander Kanavin
2023-09-14 12:56   ` Richard Purdie
2023-09-14 18:51     ` Alexander Kanavin
2023-09-14 19:54       ` Richard Purdie
2023-09-15  8:28         ` Alexander Kanavin
2023-09-20 14:25           ` Julien Stephan
2023-09-20 14:31             ` Alexander Kanavin
2023-09-20 18:04               ` Julien Stephan
2023-09-21 11:11         ` Alexander Kanavin
2023-09-21 14:39           ` [Openembedded-architecture] " chris.laplante
2023-09-22  9:17             ` Alexander Kanavin
2023-09-22 10:42               ` Richard Purdie [this message]
2023-09-28 16:43                 ` Alexander Kanavin
2023-09-28 16:49                   ` Richard Purdie
2023-09-28 17:07                     ` Alexander Kanavin
2023-09-29 12:06                     ` Alexander Kanavin
2023-09-29 12:27                       ` Richard Purdie
2023-09-29 13:09                         ` Alexander Kanavin
2023-11-01 14:18       ` [OE-core] " adrian.freihofer
2023-11-01 15:19         ` Alexander Kanavin
2023-11-01 17:20           ` [Openembedded-architecture] " adrian.freihofer
2023-11-04 10:29           ` adrian.freihofer
2023-11-04 11:09             ` Richard Purdie
2023-11-05 19:43               ` adrian.freihofer
2023-11-06 11:48                 ` Alexander Kanavin
2023-11-06 19:42                 ` [Openembedded-architecture] " Mark Hatle
2023-10-30 13:50     ` Alexander Kanavin
2023-10-30 14:07       ` Richard Purdie
2023-10-30 15:02         ` Alexander Kanavin
     [not found]         ` <1792EACC19CD8046.7262@lists.openembedded.org>
2023-10-31 12:08           ` [OE-core] " Alexander Kanavin
2023-10-31 12:28             ` Richard Purdie
2023-10-31 13:53               ` Alexander Kanavin
2023-11-01 15:45         ` [yocto] " adrian.freihofer
2023-11-01 17:28           ` Alexander Kanavin
2023-11-02  8:32             ` adrian.freihofer
2023-11-02  9:02               ` Alexander Kanavin
     [not found]               ` <1793C2E61248AF31.11290@lists.yoctoproject.org>
2023-11-02 11:51                 ` Alexander Kanavin
2024-01-22 10:47   ` Alexander Kanavin
     [not found]   ` <17ACA59E7A7FD97B.16230@lists.openembedded.org>
2024-02-05 20:35     ` [OE-core] " Alexander Kanavin
2024-02-05 21:11       ` Richard Purdie
2024-02-08 13:35         ` Alexander Kanavin
2024-02-08 13:42           ` Richard Purdie
2024-02-13 13:25             ` Alexander Kanavin
2024-02-13 13:44               ` Richard Purdie
2024-02-13 14:05                 ` Alexander Kanavin
2024-02-13 14:28                   ` Joshua Watt
2024-02-14  6:31                     ` Alexander Kanavin

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=24b60007a669d075fa1e4ccd18980ada93714c7a.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=alex.kanavin@gmail.com \
    --cc=chris.laplante@agilent.com \
    --cc=jstephan@baylibre.com \
    --cc=openembedded-architecture@lists.openembedded.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=yocto@lists.yoctoproject.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