Open strboul opened 2 years ago
The code attempts to check if a package is already installed, and if it's installed and at the most up to date version then it refrains from re-installing the package. This logic is here. I wonder if there's a bug checking the version info? Does anything in the code look incorrect to you?
FWIW in my usage I haven't seen ansible-yay attempt to reinstall up-to-date packages, so I'm curious if there's something about the installation mechanism or package data that's triggering the problem in your case
yay
module doesn't keep track of the packages installed, it re-installs them because of the default behavior of yay (see below for the explanation).I ran this example playbook on Vagrant.
1st run:
Result: 2 changed Expected: 2 changed
2nd run:
Result: 1 changed Expected: 0 changed
I think the solution is to add the
--needed
tag to the default install command.https://archlinux.org/pacman/pacman.8.html#_upgrade_options_apply_to_em_s_em_and_em_u_em_a_id_uo_a