public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Felix Moessbauer <felix.moessbauer@siemens.com>
To: isar-users@googlegroups.com
Cc: jan.kiszka@siemens.com, adriaan.schmidt@siemens.com,
	ubely@ilbers.de, Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH(sbuild) 0/1] avoid absolute SCHROOT_* paths to improve caching
Date: Thu, 28 Apr 2022 16:52:21 +0200	[thread overview]
Message-ID: <20220428145222.1872273-1-felix.moessbauer@siemens.com> (raw)

This patch is an addition to the ubely/sbuild series.
It fixes a cachability problem introduced in the sbuild.bblcass.

In general, we should be VERY careful when working with paths
in BB variables and make sure these are never expanded when assigning to another variable.
This is especially important for variables that influence the signature of many tasks,
as otherwise sstate caching in a gitlab CI will no longer be possible.
For gitlab-ci, the build folder has to be relocatable, as it gets mounted from the host into the build container.

Note: This was found with the recently added isar-sstate script:
Sample output (before / after fix):

**** comparing to eafc8f6a ****
basehash changed from 5398d6d1 to cbbae538
List of dependencies for variable SCHROOT_DIR changed from 'set()' to '{'DISTRO_ARCH', 'DISTRO'}'
Variable SCHROOT_DIR value changed from '/builds/gitlabrunner/4/build/tmp/deploy/schroot-target/debian-bullseye-amd64' to '${DEPLOY_DIR}/schroot-target/${DISTRO}-${DISTRO_ARCH}'

Unfortunately, manually finding these flaws is not easy.
The best strategy is to grep through the signature data in the stamps folder and search for absolute paths.
But the data is not pure ASCII, so this is just a heuristic.
Maybe the isar-sstate script could be extended to automatically find such cases.

Best regards,
Felix

Felix Moessbauer (1):
  avoid absolute SCHROOT_* paths to improve caching

 meta/classes/sbuild.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.30.2


             reply	other threads:[~2022-04-28 14:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 14:52 Felix Moessbauer [this message]
2022-04-28 14:52 ` [PATCH(sbuild) 1/1] " Felix Moessbauer

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=20220428145222.1872273-1-felix.moessbauer@siemens.com \
    --to=felix.moessbauer@siemens.com \
    --cc=adriaan.schmidt@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.com \
    --cc=ubely@ilbers.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