AUR update: name the packages that failed at the end
shellcheck / shellcheck (push) Successful in 18s

yay installs the other AUR updates after one fails, and its error ends up
thousands of lines above the end of the log (reports CD-EJEKVU and
CD-278CL3: flrig 2.0.12-1 has an extra checksum in its PKGBUILD). Now
20-aur.sh lists what's still out of date and says the next update tries
again. The hook still fails, so these still get reported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-26 05:51:07 -07:00
co-authored by Claude Opus 5.5
parent 4fb35397ee
commit 01d24327d9
2 changed files with 44 additions and 2 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env bats
load test_helper
@test "20-aur names the AUR packages a failed update left behind" {
# yay -Sua fails on flrig (a broken PKGBUILD) after installing the rest
stub yay '
case "$1" in
--version) echo "yay v12" ;;
-Sua) exit 1 ;;
-Qua) echo "flrig 2.0.10-1 -> 2.0.12-1" ;;
esac'
run bash "$REPO/updates.d/20-aur.sh"
[ "$status" -eq 1 ]
[[ "$output" == *"These AUR packages could not be updated: flrig"* ]]
called yay -Sua --noconfirm --answerdiff=None --answeredit=None --answerclean=None
}
@test "20-aur succeeds quietly when yay does" {
stub yay '[ "$1" = --version ] && echo "yay v12"; exit 0'
run bash "$REPO/updates.d/20-aur.sh"
[ "$status" -eq 0 ]
[[ "$output" != *"could not be updated"* ]]
}