fix(ci): install only makedepends, skip full depends via -d

moonarch-git's runtime depends include AUR-only packages (stasis,
auto-cpufreq, ttf-ubuntusans-nerd) that plain pacman cannot resolve,
so `makepkg -s` fails with "Could not resolve all dependencies" —
even though those runtime deps aren't needed to build the package.

Extract makedepends from PKGBUILD, install them targeted (cargo/go
for Rust and Go packages; empty for moonarch-git), then run makepkg
with -d so it skips the full dep check. Rust packages still get their
compiler, moonarch-git builds without needing the AUR world.
This commit is contained in:
nevaforget 2026-04-20 12:38:40 +02:00
parent 2c748ec5be
commit 71a94ac74e

View File

@ -41,7 +41,16 @@ jobs:
echo "==> Building $pkg"
cd "$pkg"
makepkg -sf --noconfirm
# Install makedepends manually (cargo, go, …) and skip the full
# depends check via -d. Rationale: moonarch-git's runtime depends
# include AUR-only packages (stasis, auto-cpufreq, ttf-ubuntusans-nerd)
# which pacman can't resolve. Those deps aren't needed at build time.
MAKEDEPS=$(awk '/^makedepends=\(/,/^\)/' PKGBUILD | grep -oE "'[^']+'" | tr -d "'" | tr '\n' ' ')
if [ -n "$MAKEDEPS" ]; then
# shellcheck disable=SC2086
sudo pacman -S --needed --noconfirm $MAKEDEPS
fi
makepkg -sfd --noconfirm
# makepkg can emit multiple artifacts per build (main + -debug
# split package). Upload each. Arch filename convention: