public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH(sbuild) 0/1] avoid absolute SCHROOT_* paths to improve caching
@ 2022-04-28 14:52 Felix Moessbauer
  2022-04-28 14:52 ` [PATCH(sbuild) 1/1] " Felix Moessbauer
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Moessbauer @ 2022-04-28 14:52 UTC (permalink / raw)
  To: isar-users; +Cc: jan.kiszka, adriaan.schmidt, ubely, Felix Moessbauer

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-28 14:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28 14:52 [PATCH(sbuild) 0/1] avoid absolute SCHROOT_* paths to improve caching Felix Moessbauer
2022-04-28 14:52 ` [PATCH(sbuild) 1/1] " Felix Moessbauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox