Repository navigation
Conversation
|
You are right about the problem — shipping upstream's x86 upgrade on a Mac-only fork is a live footgun, and a warning in docs clearly is not enough. I would like to solve it a different way, for a reason the diff does not show. Owning upstream's filename costs a permanent merge conflict. Replacing that file's contents makes every one of those a conflict on A shim gets the same result for one hunk. Nine lines at the top of upstream's script, leaving the rest untouched: # Apple Silicon: this is upstream's x86 upgrade, which rewrites the mirrorlist
# to x86_64 mirrors and breaks pacman for the whole system. Hand off to the Mac
# upgrade instead of running, whichever name the user reached for.
if [[ $(uname -m) == aarch64 ]]; then
if command -v omarchy-upgrade-to-quattro-mac >/dev/null; then
exec omarchy-upgrade-to-quattro-mac "$@"
fi
echo "This is the x86 upgrade and would break pacman on Apple Silicon." >&2
echo "Run the Mac upgrade instead:" >&2
echo " curl -fsSL https://raw.githubusercontent.com/omarchy-mac/omarchy-mac/quattro/bin/omarchy-upgrade-to-quattro-mac | bash" >&2
exit 1
fiTested both paths on an M2 Max:
No renames, so no docs or tests to chase, and upstream's file keeps merging except for one hunk at the very top that upstream rarely touches. For the record, the current branch also needs mechanical fixes if you would rather keep the rename: Happy to open the shim as a small PR crediting you, or you can fold it into this branch — your call. #292 is unaffected and I will look at it separately. |
|
@scottjones, Thanks for the review, I'll end my work the suggested way, It's a great move. I'll be able to do the patch in a few hours, 'll try not to forget |
b1f8553 to
f63d231
Compare
f63d231 to
88e67f1
Compare
|
@scottjones updated the branch with your suggestion. If I get it right, I don't need to change anything else |
|
This is much better — 15 lines instead of 2600, upstream's file keeps its name and content, and the permanent merge-conflict tax is gone. Tests pass here ( One correction to the framing, which changes what is left to do. [[ $(uname -m) != "aarch64" ]] || fail "This is the upstream x86 upgrade. On Apple Silicon run omarchy-upgrade-to-quattro-mac."So the footgun was not live: running it on a Mac already stopped with a clear message. What this PR adds is delegation — the command now does the right thing instead of failing. A real improvement, just a smaller one than "users might run the x86 one and break pacman", and it leaves two loose ends. 1. Two guards now, one unreachable. With the shim at the top, control never reaches line 136 on aarch64 — it has either 2. The docs removal goes too far. Deleting the warning is right — it says "never run this", which is no longer true — but going silent loses the explanation, and someone on an older checkout still has the version that refuses rather than hands off. Something like: - **Either command works on a Mac.** `omarchy-upgrade-to-quattro` is the
upstream x86 upgrade, which would repoint pacman at x86_64 mirrors that do
not serve aarch64. On Apple Silicon it hands off to
`omarchy-upgrade-to-quattro-mac` instead of running, so either name is fine.
An older checkout refuses rather than handing off — update first.With those two, I am happy to merge this. |
|
@scottjones done |
|
Thanks for taking the shim route — this is much cheaper to carry than owning upstream's filename. One placement problem, and it is my fault for handing you the snippet without saying where it goes: the guard sits above the Moving the guard to just below The guard itself behaves correctly: with Worth knowing the metadata trap in general — the CLI suite even has a case named "metadata-looking comments after script body are ignored", so anything executable before that block silently costs the command its description. |
|
Please rebase onto current quattro and reduce this to the ARM guard and handoff. The whole-file formatting churn obscures the functional change and creates avoidable conflicts in a critical upgrade script. |
|
Closing in favor of upstream merge. |
Why:
What does this PR do:
omarchy-upgrade-to-quattrowithomarchy-upgrade-to-quattro-mac