Skip to content

fix(setup): say when a cached clone was reused and not updated - #181

Merged
srpatcha merged 1 commit into
masterfrom
fix/setup-reports-stale-cache
Oct 6, 2026
Merged

srpatcha merged 1 commit into
masterfrom
fix/setup-reports-stale-cache

Conversation

@srpatcha

@srpatcha srpatcha commented Oct 6, 2026

Copy link
Copy Markdown
Member

Fixes #180

Problem

ebuild setup on a machine that already has ~/.ebuild/repos/eos reports Setup complete. Repos are ready. exactly as for a fresh clone. DepsManager.setup() intentionally does not pull an existing clone, so nothing told the user their eos was from 2026-09-11; ebuild sim qemu_cortex_m3 then failed with sim.yaml not found. Found while re-running the MVP pipeline on WSL.

Change

ebuild/cli/commands.py: before each mgr.setup(), note whether the cache dir already existed (and no --*-path link was given). If so, after setup print a [warn] with the clone's %h %cs and ebuild repos update. The clone/update logic is untouched.

Verification (WSL, Python 3.12)

Real scenario, temp HOME with eos reset to 9ed6831:

[ok]   eos: /tmp/tmp.IIkenVkFfL/.ebuild/repos/eos
[warn]   eos was already cloned (at 9ed6831 2026-09-11); setup does not pull. Run `ebuild repos update` to get the latest.
[ok]   eboot: /tmp/tmp.IIkenVkFfL/.ebuild/repos/eboot
[warn]   eboot was already cloned (at 16fee2f 2026-10-05); setup does not pull. Run `ebuild repos update` to get the latest.
[ok] Setup complete. Repos are ready.

(First run in that HOME cloned eboot fresh and printed no eboot warning.)

  • tests/unit/test_setup_stale_cache.py: 4 passed (fresh clone -> no warning; existing git clone -> commit+date+command; existing non-git dir -> 'unknown commit'; --eos-path -> no warning). With the CLI change reverted, 2 of them fail.
  • python -m pytest tests/: 897 passed, 2 skipped. ruff check .: All checks passed.

After ebuild repos update on the same machine, embeddedos-stack MVP pipeline --strict passed all five stages against today's masters (eos dc13c59).

DepsManager.setup() leaves an existing ~/.ebuild/repos/<name> alone on
purpose (it must not move a pinned branch or tag), but the CLI printed
the same 'Repos are ready' as for a fresh clone. A month-old eos then
fails later in 'ebuild sim' with sim.yaml not found.

Warn with the clone's commit and date and name 'ebuild repos update'.
Clone/update logic is unchanged; --eos-path/--eboot-path links are not
reported as cached.

Fixes #180

Signed-off-by: Srikanth Patchava <srpatcha@users.noreply.github.com>
@srpatcha
srpatcha requested a review from hshanmug12 as a code owner October 6, 2026 23:08
@srpatcha
srpatcha merged commit ecd7376 into master Oct 6, 2026
33 checks passed
@srpatcha
srpatcha deleted the fix/setup-reports-stale-cache branch October 6, 2026 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ebuild setup reports 'Repos are ready' for a stale cached clone and never says it did not update

1 participant