From c5f06515a0467248a7f07c61bf6ae904dc7246de Mon Sep 17 00:00:00 2001 From: David Young Date: Thu, 22 Oct 2026 13:13:32 -0600 Subject: [PATCH] fix yay updates --- updates.d/20-aur.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/updates.d/20-aur.sh b/updates.d/20-aur.sh index c022b22..ce2dcfa 100644 --- a/updates.d/20-aur.sh +++ b/updates.d/20-aur.sh @@ -4,8 +4,11 @@ echo "Updating AUR..." YAY_FLAGS="--noconfirm --answerdiff=None --answeredit=None --answerclean=None" -if ! yay -Sua $YAY_FLAGS 2>/dev/null; then - echo "yay -Sua returned an error. Let's rebuild YAY." +# Only rebuild yay when yay itself is broken (e.g. a pacman upgrade bumped +# libalpm). A failing AUR package is not fixed by a rebuild, so let that error +# show and fail the hook instead. +if ! yay --version &>/dev/null; then + echo "yay is broken (likely a libalpm bump). Rebuilding yay..." sudo pacman -R --noconfirm yay cd /tmp rm -rf yay @@ -15,7 +18,6 @@ if ! yay -Sua $YAY_FLAGS 2>/dev/null; then cd .. rm -rf yay cd - yay -Sua $YAY_FLAGS -else - echo "AUR up to date." fi + +yay -Sua $YAY_FLAGS