Repository navigation
Keep mise's GOROOT out of AUR package builds - #16388
Conversation
[Medium impact] This PR appears safe to merge. Summary
Reviews (2) · Last reviewed commit: "Name the upgrade as the caller that pair..." · Reviewed by Greptile |
|
Reviewed at 711bd25 against Reproduced on a disposable worker built from the Omarchy ISO. I installed Arch's
Suite on the worker. Second opinion. Codex Medium and muse-spark-1.3 (via pi, thinking high) reviewed the change separately and found no defect. Both agreed the AUR step is the right place: it covers
This is waiting on the maintainer. |
omacom#17000 dropped the sudo-no-update wrapper this branch sat next to, so the AUR step keeps quattro's plain yay call and adds the unset above it.
omarchy-update keeps the caller's PATH since omacom#17000, so mise's go and GOROOT stay together there. omarchy-upgrade-to-quattro still runs the AUR step with its system-first package_path.
* Keep mise's GOROOT out of AUR package builds * Name the upgrade as the caller that pairs system PATH with mise's GOROOT omarchy-update keeps the caller's PATH since #17000, so mise's go and GOROOT stay together there. omarchy-upgrade-to-quattro still runs the AUR step with its system-first package_path. --------- Co-authored-by: Ryan Hughes <ryan@heyoodle.com> (cherry picked from commit c125859)
Fixes #16387.
With mise managing Go, every Go AUR package failed to build during
omarchy updatewithcompile: version "go1.27.3" does not match go tool version "go1.27.3-X:nodwarf5". mise's activation exportsGOROOTandGOBINfor its own Go. Any caller that runs the AUR step with the systemPATHbut the caller's environment ends up with Arch's/usr/bin/godriving mise's compiler.omarchy updateused to be that caller. Since #17000 it keeps the caller'sPATH, so mise'sgoand itsGOROOTstay paired there.omarchy-upgrade-to-quattrostill is: run as the user, it callsomarchy-update-aur-pkgsthroughrun_as_user_omarchywith its system-firstpackage_pathand everything else inherited. That's the path a 3.x user with mise's Go and a Go AUR package hits when upgrading.omarchy-update-aur-pkgsnow unsetsGOROOTandGOBINbefore running yay. Every go binary finds its own root whenGOROOTis unset, so this is safe whichever go is onPATH, including when someone runs the command directly from a mise-activated shell.GOBINgoes too, so a PKGBUILD that runsgo installdoesn't write into mise's install directory.I put the fix in the AUR step rather than in its callers, so
omarchy update, the upgrade and a standaloneomarchy-update-aur-pkgsall get it.Tested on my machine: wacli 0.24.0 and trufflehog 3.99.4 failed in the update and now build with the update's
PATH../test/clipasses. I wrote a stubbed-yay test that checked the environment it received. It failed on quattro and passed with the change, but I left it out because it only guards this one line.