fix(ci): skip prepare() in publish-aur metadata container #51

Merged
razvandimescu merged 1 commits from fix/aur-skip-prepare into main 2026-04-10 00:39:28 +08:00
razvandimescu commented 2026-04-10 00:34:37 +08:00 (Migrated from github.com)

Summary

Third in a chain of fixes after #49 and #50. With ownership and quoting resolved, the next run (24199871832) got all the way to `makepkg` and failed with:

```
/pkg/PKGBUILD: line 34: cargo: command not found
==> ERROR: A failure occurred in prepare().
```

Root cause

The publish job's container only installs `binutils git sudo` because its only purpose is to regenerate `.SRCINFO`. But `makepkg -od` still runs `prepare()`, which invokes `cargo`. The sibling `validate` job sidesteps this with `--noprepare` (and installs `rust` anyway).

Fix

Add `--noprepare` to the metadata-generation invocation. In makepkg's pipeline, `pkgver()` runs before `prepare()`, so `.SRCINFO` still captures the computed version — and we avoid dragging a ~100 MB rust toolchain into a container that only needs to parse PKGBUILD metadata.

Test plan

  • Merge and confirm `Publish to AUR` reaches `git push origin master` successfully.
  • Confirm the published `.SRCINFO` on the AUR repo has a correctly computed `pkgver`.

🤖 Generated with Claude Code

## Summary Third in a chain of fixes after #49 and #50. With ownership and quoting resolved, the next run ([24199871832](https://github.com/razvandimescu/numa/actions/runs/24199871832)) got all the way to \`makepkg\` and failed with: \`\`\` /pkg/PKGBUILD: line 34: cargo: command not found ==> ERROR: A failure occurred in prepare(). \`\`\` ## Root cause The publish job's container only installs \`binutils git sudo\` because its only purpose is to regenerate \`.SRCINFO\`. But \`makepkg -od\` still runs \`prepare()\`, which invokes \`cargo\`. The sibling \`validate\` job sidesteps this with \`--noprepare\` (and installs \`rust\` anyway). ## Fix Add \`--noprepare\` to the metadata-generation invocation. In makepkg's pipeline, \`pkgver()\` runs **before** \`prepare()\`, so \`.SRCINFO\` still captures the computed version — and we avoid dragging a ~100 MB rust toolchain into a container that only needs to parse PKGBUILD metadata. ## Test plan - [ ] Merge and confirm \`Publish to AUR\` reaches \`git push origin master\` successfully. - [ ] Confirm the published \`.SRCINFO\` on the AUR repo has a correctly computed \`pkgver\`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.