From 2598d4e930b3130637ab73fc82e58a358423daff Mon Sep 17 00:00:00 2001 From: Razvan Dimescu Date: Thu, 9 Apr 2026 19:34:20 +0300 Subject: [PATCH] fix(ci): skip prepare() in publish-aur metadata container Follow-up to #49 and #50. With ownership and quoting fixed, the next run ([24199871832](https://github.com/razvandimescu/numa/actions/runs/24199871832)) reached makepkg and failed with: /pkg/PKGBUILD: line 34: cargo: command not found ==> ERROR: A failure occurred in prepare(). The publish job only installs 'binutils git sudo' since its sole purpose is to regenerate .SRCINFO. 'makepkg -od' still runs prepare(), which calls cargo. The sibling validate job avoids this by passing --noprepare (and installs rust anyway). Mirror that pattern: add --noprepare to the metadata-generation invocation. pkgver() runs before prepare() in makepkg's pipeline, so .SRCINFO still captures the computed version. Keeps the container minimal (no rust toolchain). Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/publish-aur.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-aur.yml b/.github/workflows/publish-aur.yml index ea5dc7f..49275a0 100644 --- a/.github/workflows/publish-aur.yml +++ b/.github/workflows/publish-aur.yml @@ -132,7 +132,10 @@ jobs: cd /pkg sudo -u builduser git config --global --add safe.directory '*' # makepkg -od fetches the source first so pkgver() can calculate the version. - sudo -u builduser makepkg -od && sudo -u builduser makepkg --printsrcinfo > .SRCINFO + # --noprepare skips the prepare() function, which invokes cargo and would + # otherwise require a full rust toolchain in this metadata-only container. + # pkgver() runs before prepare(), so .SRCINFO still gets the correct version. + sudo -u builduser makepkg -od --noprepare && sudo -u builduser makepkg --printsrcinfo > .SRCINFO " # Reclaim ownership: the in-container 'chown -R builduser:builduser /pkg' -- 2.34.1