fix: use stable kas-container mount points for DL_DIR/SSTATE_DIR#13
Merged
fix: use stable kas-container mount points for DL_DIR/SSTATE_DIR#13
Conversation
Remove vsim-era content: two mermaid diagrams, session history table, stale path references (hosts/n100-*, modules/hardware/, modules/roles/, VSIM-INTEGRATION-PLAN.md, tests/integration/), redundant architecture sections, oversized platform/troubleshooting/ARM64/resource-control sections, and "Integrated from vsim project" footer. Retain: framework purpose with clear "not primary test infra" callout, platform requirements, directory structure, build/run commands, inner-VM usage (virsh, OVS, tc profiles), compact ASCII architecture diagram, traffic control profile table, flake outputs, and references.
base.yml used ${HOME}/.cache/yocto/{downloads,sstate} in local_conf_header,
but inside kas-container, kas overrides HOME to an ephemeral tmpdir
(/tmp/tmpXXXXXX). BitBake expanded ${HOME} to that tmpdir, so all downloads
were destroyed when the container exited. Neither devShell nor kas-build
exported DL_DIR/SSTATE_DIR as host environment variables, so kas-container
never mounted a persistent cache directory.
Fix:
- kas-build wrapper (both Darwin and Linux): export DL_DIR and SSTATE_DIR
with defaults of ~/.cache/yocto/{downloads,sstate}, using ${VAR:-default}
so CI can override
- base.yml: hardcode /downloads and /sstate (the stable kas-container
mount points that correspond to the host DL_DIR/SSTATE_DIR)
- Delete ci-cache.yml overlay (existed solely to override the broken ${HOME}
paths for CI; now redundant)
- Remove ci-cache.yml from build-matrix.nix mkCiKasCommand
- Remove .git-downloads workaround from isar-build-all.sh and CI workflow
(DL_DIR now resolves to /downloads which is stable across container
sessions, so .git-downloads symlinks no longer go stale)
- Update CLAUDE.md: replace stale workaround docs with new caching docs
References: siemens/kas#52, siemens/kas#148
Switch mirrors.yml from upstream ilbers/isar to our fork at kyosaku-kai/isar on the fix/do-adjust-git-dangling-symlinks branch. The fork contains a one-line fix: os.path.exists() → os.path.lexists() in dpkg-base.bbclass do_adjust_git(), fixing FileExistsError when DL_DIR mount paths change between kas-container sessions (dangling .git-downloads symlink not detected by exists() which follows symlinks). Revert to upstream once ilbers/isar merges the fix.
Update mirrors.yml PENDING placeholders with actual upstream tracking: - Issue: ilbers/isar#122 - PR: ilbers/isar#123
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/downloadsand/sstatemount points instead of host paths that change between sessionsDL_DIR/SSTATE_DIRfrom flake.nix devShell so kas-container mounts host cache dirs automaticallyci-cache.ymloverlay (CI setsDL_DIR/SSTATE_DIRenv vars directly, picked up by the same mechanism)do_adjust_git()Problem
ISAR builds failed with
FileExistsErrorwhenDL_DIRchanged between kas-container sessions. Two root causes:base.ymlused${HOME}inlocal_conf_header, but kas overridesHOMEto an ephemeral tmpdir inside the container ($HOME variable is overwritten siemens/kas#148)do_adjust_git()in dpkg-base.bbclass usedos.path.exists()which follows symlinks, missing dangling ones left from previous sessionsChanges
backends/debian/kas/base.yml: HardcodeDL_DIR="/downloads"andSSTATE_DIR="/sstate"(stable container mount points)flake.nix: ExportDL_DIR/SSTATE_DIRenv vars with~/.cache/yocto/{downloads,sstate}defaultsbackends/debian/kas/opt/ci-cache.yml: Removed (redundant — CI sets env vars directly).github/workflows/ci.yml: Remove ci-cache.yml from kas command chainsbackends/debian/kas/mirrors.yml: Point ISAR at kyosaku-kai fork withos.path.lexists()fixTest plan
nix run '.' -- --variant basecompletes withoutFileExistsError