Openembedded Bitbake Development
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: philip.lorenz@bmw.de, bitbake-devel@lists.openembedded.org
Subject: Re: [bitbake-devel] [RFC PATCH] fetch: `touch` mirror tarball stamp files on download
Date: Wed, 02 Sep 2026 16:26:17 +0100	[thread overview]
Message-ID: <23d0c2d324bb72af498f83cd45adc141ae0fd537.camel@linuxfoundation.org> (raw)
In-Reply-To: <2527846.1788352985580782981@lists.openembedded.org>

On Wed, 2026-09-02 at 05:43 -0700, Philip Lorenz via lists.openembedded.org wrote:
> On Wed, Sep 2, 2026 at 11:06 AM, Richard Purdie wrote:
> > On Wed, 2026-09-02 at 10:32 +0200, Philip Lorenz via lists.openembedded.org wrote:
> > > The mirror tarball stamp file's mtime is currently only updated on
> > > creation / initial download. This makes it difficult to detect whether a
> > > mirror tarball is still relevant in a given build.
> > > 
> > > Improve this by also `touch`ing the mirror tarball stamp files alongside
> > > the sources primary stamp file.
> > This gets a bit tricky as we don't touch every download file at every
> > download, we only touch the end stamp file.
> > 
> > This would mean we touch mirror files and stamp files but not main
> > download files and I think brings things into more disparity?
> This patch extends bitbake to touch the mirror tarball's `.done` file (not the 
> mirror tarball itself) to bring it inline with regular stamp file handling.
> > I can also think of cases where updating the timestamp may cause things
> > to re-download the tarballs too since you can't know the content in
> > advance with many of them. This is perhaps the stronger reason not to
> > do this.
> I'm not completely familiar with all of the fetcher details (and also couldn't 
> find anything obvious) but in which cases would changing the mtime lead to a 
> redownload? I'm not sure if this is still an issue given that this only updates 
> the `.done` files of the mirror tarballs though.
>  
> The rationale behind this change is that we'd like to clean up our download caches 
> and only keep the inputs relevant to the latest build configuration around. Using 
> `.done` files (after executing a `bitbake --runall=fetch`) works for this as long 
> as the mirror tarballs are freshly created. On consecutive runs their `.done` file 
> is not touched and they are therefore deemed out of date.

I hadn't fully taken in the fact it was just the done stamps, sorry.
This does still leave me with questions though.

For example we have cases where it wouldn't try and download mirror
tarballs. If the main source repo is up to date or even just present,
it could fetch to there and the mirror tarballs wouldn't be touched.
They could even be out of date compared to the main source repo unless
the tarball generation options are set.

So in the context of having mirror tarball generation set, the patch
could make sense but probably not outside of that.

I have thoughts about changing the way mirror tarballs work in the next
release anyway so I'm still leaning towards not adding more complexity
right now...

Cheers,

Richard



      reply	other threads:[~2026-09-02 15:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-02  8:32 [RFC PATCH] fetch: `touch` mirror tarball stamp files on download Philip Lorenz
2026-09-02  9:06 ` [bitbake-devel] " Richard Purdie
2026-09-02 12:43   ` Philip Lorenz
2026-09-02 15:26     ` 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=23d0c2d324bb72af498f83cd45adc141ae0fd537.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=philip.lorenz@bmw.de \
    /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