fix(smoke): reseed mcpplibs cleanly, excluding the repo's read-only .git packs#53
Merged
Merged
Conversation
…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.
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.
Symptom
smoke-full-linuxfailed with hundreds of: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 timesmoke_imgui_module.shruns, an earlier smoke has populated$MCPP_HOME/registry/data/mcpplibs/.gitwith read-only git pack objects (git writes packs mode 0444).smoke_imgui_module.shthen ran, with no guard:which copies the repo's own
.git(same-named, read-only packs) over the existing read-only packs.cpcannot overwrite a read-only target → Permission denied → the job fails.Not a mcpp/xlings bug: mcpp shells no such
cp(only ninja BMIcp -f); xlings copies viastd::filesystem::copy. Thecp:is this shell line.Fix
rm -rfthe 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 needspkgs/; 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.