Installing rustup fails with the following error
==> Installing 1 package(s):
rustup 1.29.0_2_2
==> Downloading + installing 1 packages...
nb: rustup: materialize failed: error.CopyFailed
✗ rustup (materialize failed)
Reproduce
Environment is macOS 26.5.2, with no Homebrew installation left.
Rest is written by Claude
Cause
The revision is counted twice, so the computed keg version is wrong.
rustup's registry/upstream.json entry sets both:
"revision": 2,
"resolved": { "version": "1.29.0_2" } // revision already baked in
effectiveVersion (src/api/formula.zig:33) appends it again: "1.29.0_2" + "_2" → "1.29.0_2_2". But the bottle's real keg dir is 1.29.0_2, so materialize cps a nonexistent path → CopyFailed. (The bottle's wrapper scripts also hardcode 1.29.0_2.)
buildPinnedFormula (src/main.zig:616) already avoids this by setting .revision = 0 when the version is pre-suffixed; the bottle-resolved path (src/upstream/github.zig:275) does not.
Fix
Either/both:
- Data: rustup's
resolved.version should be "1.29.0" (base), leaving revision: 2 to add the suffix. Likely affects other homebrew_bottle entries with revision > 0.
- Code: make
effectiveVersion idempotent — skip appending _<revision> if version already ends with it.
Installing rustup fails with the following error
Reproduce
Environment is macOS 26.5.2, with no Homebrew installation left.
Cause
The revision is counted twice, so the computed keg version is wrong.
rustup's
registry/upstream.jsonentry sets both:effectiveVersion(src/api/formula.zig:33) appends it again:"1.29.0_2" + "_2"→"1.29.0_2_2". But the bottle's real keg dir is1.29.0_2, so materializecps a nonexistent path →CopyFailed. (The bottle's wrapper scripts also hardcode1.29.0_2.)buildPinnedFormula(src/main.zig:616) already avoids this by setting.revision = 0when the version is pre-suffixed; the bottle-resolved path (src/upstream/github.zig:275) does not.Fix
Either/both:
resolved.versionshould be"1.29.0"(base), leavingrevision: 2to add the suffix. Likely affects otherhomebrew_bottleentries withrevision > 0.effectiveVersionidempotent — skip appending_<revision>ifversionalready ends with it.