Skip to content

fix(smoke): reseed mcpplibs cleanly, excluding the repo's read-only .git packs#53

Merged
Sunrisepeak merged 1 commit into
mainfrom
fix/smoke-readonly-pack-reseed
Jun 29, 2026
Merged

fix(smoke): reseed mcpplibs cleanly, excluding the repo's read-only .git packs#53
Sunrisepeak merged 1 commit into
mainfrom
fix/smoke-readonly-pack-reseed

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Symptom

smoke-full-linux failed with hundreds of:

cp: cannot create regular file '.../mcpplibs/./.git/objects/pack/pack-*.pack': Permission denied

Pre-existing since #51 (a docs-only PR) — i.e. environmental, not content-driven.

Root cause

The smoke jobs run several scripts under one shared MCPP_HOME. By the time smoke_imgui_module.sh runs, an earlier smoke has populated $MCPP_HOME/registry/data/mcpplibs/.git with read-only git pack objects (git writes packs mode 0444). smoke_imgui_module.sh then ran, with no guard:

cp -a "$ROOT/." "$default_index/"

which copies the repo's own .git (same-named, read-only packs) over the existing read-only packs. cp cannot overwrite a read-only target → Permission denied → the job fails.

Not a mcpp/xlings bug: mcpp shells no such cp (only ninja BMI cp -f); xlings copies via std::filesystem::copy. The cp: is this shell line.

Fix

rm -rf the destination first (rm removes read-only files — it needs write on the parent dir, not the file), then seed from the working tree excluding .git. The package index only needs pkgs/; the repo's read-only pack objects are irrelevant and the sole cause of the conflict.

Verified

Local reproduction: old path → 821 Permission denied; new path → 0, pkgs/ present.

…git packs

smoke-full-linux failed in 'smoke tests' with hundreds of:
  cp: cannot create regular file '.../mcpplibs/./.git/objects/pack/pack-*.pack': Permission denied

Root cause: the smoke jobs run several scripts under one shared MCPP_HOME. By the
time smoke_imgui_module.sh runs, an earlier smoke has already populated
$MCPP_HOME/registry/data/mcpplibs/.git with read-only git pack objects (git
makes packs mode 0444). smoke_imgui_module.sh then did, with no guard:
  cp -a "$ROOT/." "$default_index/"
which copies the repo's OWN .git (same-named, read-only packs) over the existing
read-only packs — and cp cannot overwrite a read-only target -> Permission
denied -> the whole job fails (exit 1). Pre-existing since #51; not a mcpp/xlings
bug (mcpp shells no such cp; xlings uses std::filesystem::copy).

Fix: remove the destination first (rm -rf tolerates read-only files — it needs
write on the parent dir, not the file), and seed from the working tree EXCLUDING
the repo's .git. The package index only needs pkgs/; the repo's read-only pack
objects are both irrelevant and the sole cause of the conflict.

Reproduced locally: old path -> 821 'Permission denied'; new path -> 0, pkgs/
present.
@Sunrisepeak Sunrisepeak merged commit 570c2e9 into main Jun 29, 2026
7 checks passed
@Sunrisepeak Sunrisepeak deleted the fix/smoke-readonly-pack-reseed branch June 29, 2026 05:19
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.

1 participant