How to get a warning before every update of just a set of specified packages?

You could use a utility script like this

And amend to fit your purpose

#!/usr/bin/env bash
reboot="(ucode|cryptsetup|linux|nvidia|mesa|systemd|wayland|xf86-video|xorg)"
if [[ $(which yay) =~ (yay) ]]; then
    updates=$(checkupdates; yay -Qua)
else
    updates=$(checkupdates)
fi
echo "$updates"
if [[ $updates =~ $reboot ]]; then
    echo "Updating possibly requires system restart ..."
fi
if [[ $updates =~ 'cryfs' ]]; then
    echo "Oh-oh - watch out for cryfs update ..."
fi
4 Likes