public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "'MOESSBAUER, Felix' via isar-users" <isar-users@googlegroups.com>
To: "Kiszka, Jan" <jan.kiszka@siemens.com>,
	"isar-users@googlegroups.com" <isar-users@googlegroups.com>
Subject: Re: [PATCH 1/1] fix(dpkg-build): deploy debs via shared sstate dir
Date: Thu, 30 Jul 2026 15:12:00 +0000	[thread overview]
Message-ID: <e01b8a38dafd38fe8219b87620570f18837bcae6.camel@siemens.com> (raw)
In-Reply-To: <0aebf31c-d213-4805-9cbb-d0d106024f83@siemens.com>

On Thu, 2026-07-30 at 16:41 +0200, Jan Kiszka wrote:
> On 29.07.26 13:18, Felix Moessbauer wrote:
> > The built debs were stored in a WORKDIR-internal plaindir and consumed
> > from there by do_deploy_deb. do_deploy_deb is a task that mutates
> > the external isar-apt repository and can therefore never be sstate
> > cached, so it always runs and relies on the plaindir being present on
> > disk.
> > 
> > When do_dpkg_build is served from the sstate cache, that WORKDIR-internal
> > plaindir is not guaranteed to be materialized (e.g. when the task is
> > covered via hash equivalence without a setscene restore). do_deploy_deb
> > then runs against an empty deploy dir, passes an unexpanded glob to
> > dpkg-deb and aborts the build.
> 
> Not getting it: why is dpkg_build_setscene not properly filling
> DEPLOYDIR then? We told it that the build will fill it, it picked things
> up from there for caching, and it should refill it when it skips the task.

Well... That's unfortunately how bitbake works. The artifacts in
plaindirs are not under sstate manifest control (the thing that also
blames you if you deploy artifacts with equal name but different
content to the same location). That also means they are removed on
"clean".

In other words, the staging/copy step only runs when the task's
setscene is actually executed (i.e. the sstate object is unpacked).  It
does not run when the task is considered to be already executed based
on hash equivalence. In this case, the restore directly happens from
the sstate cache via it's manifest tracking.

Don't ask me WHY bitbake internally implements it like that...

Hash equivalence is described in [1], I still can only find this detail
in the sstate sources (and runqueue.py line 2324ff) ...

[1]
https://docs.yoctoproject.org/overview-manual/concepts.html#hash-equivalence

> 
> > 
> > Fix it by deploying the debs into a shared, sstate-tracked DEPLOY_DIR_DEB
> > via sstate-inputdirs/sstate-outputdirs.
> 
> This is creating yet another copy of the generated deb files in our
> build dirs. Sounds inefficient, specifically when we have larger artifacts.

Yes, unfortunately. But we need to properly deploy these artifacts. One
optimization would be to hardlink the isar-apt cache pool files to
these deployed files, however I'm not sure if this can practically be
implemented.

I'm not so much worried about the additional space consumption. A way
bigger waste of space are the left-over chroots.

Felix

> 
> Jan
> 
> -- 
> Siemens AG, Foundational Technologies
> Linux Expert Center

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/e01b8a38dafd38fe8219b87620570f18837bcae6.camel%40siemens.com.

  reply	other threads:[~2026-07-30 15:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-29 11:18 'Felix Moessbauer' via isar-users
2026-07-30 14:41 ` 'Jan Kiszka' via isar-users
2026-07-30 15:12   ` 'MOESSBAUER, Felix' via isar-users [this message]
2026-07-31  9:26 ` Zhihang Wei
2026-07-31 10:10   ` 'MOESSBAUER, Felix' via isar-users

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=e01b8a38dafd38fe8219b87620570f18837bcae6.camel@siemens.com \
    --to=isar-users@googlegroups.com \
    --cc=felix.moessbauer@siemens.com \
    --cc=jan.kiszka@siemens.com \
    /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