kewlfft / ansible-aur

Ansible module to manage packages from the AUR
GNU General Public License v3.0
294 stars 46 forks source link

fix for issue #77 #78

Closed jp1995 closed 1 year ago

jp1995 commented 1 year ago

yay appears to be the only one of these supported aur helpers that stores the built package and keeps it even after the package has been removed, and then on (re)install outputs -> cava-0.8.3-1 already made -- skipping build where the -- skipping in the output makes the changed_iter bool remain False in the current live version, hence the issue.

So a very minor edit here to the changed_iter condition -- skipping --> up-to-date -- skipping.

I tested this with yay, paru, trizen, pikaur, aurman and makepkg.

To test, I manually installed a package, and then ran the same play as in the issue to test install (with the package already installed), uninstall and reinstall. In every case the output was the desired:

TASK [test : Test install] ***************************************************************
ok: [iota]

TASK [test : Remove test package] ********************************************************
--- before
+++ after
@@ -1 +0,0 @@
-cava-0.8.3-1

changed: [iota]

TASK [test : Test reinstall] *************************************************************
changed: [iota]

I would have to set up an x86 vm to test pacaur as a dependency failed to build for aarch64. Pacaur hasn't been updated in 5 years though and is unmaintained so I'm not even sure it works anymore.

There might be some extra testing you want to do as I obviously don't know this module particularly well and might have missed something.