Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reinstall doesn't report change #77

Closed
jp1995 opened this issue Jul 6, 2023 · 1 comment
Closed

Reinstall doesn't report change #77

jp1995 opened this issue Jul 6, 2023 · 1 comment

Comments

@jp1995
Copy link
Contributor

jp1995 commented Jul 6, 2023

- name: Test install
  kewlfft.aur.aur:
    name: units
    state: present
    use: yay
  become: yes
  become_user: aur_builder
  
- name: Remove test package
  community.general.pacman:
    name: units
    state: removed
    remove_nosave: true
    
- name: Test reinstall
  kewlfft.aur.aur:
    name: units
    state: present
    use: yay
  become: yes
  become_user: aur_builder

produces:

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

TASK [test : Remove test package] ********************************************************
--- before
+++ after
@@ -1 +0,0 @@
-units-2.22-2

changed: [iota]

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

wheras expected behaviour would be:

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

I figured maybe this had to do with cached packages, but none of the package I tested with (grafana-bin, units) cached anything in /var/cache/pacman/pkg or ~/.cache/yay/ and reinstall is always recompiling too.

Manually running pacman -Rdd or pacman -Rns doesn't work either.

The community.general.pacman module does have this expected behaviour on reinstall.

Not a pacman / arch expert by any means, but Is there something specific I'm supposed to do here to solve this, or is this a bug?

@jp1995
Copy link
Contributor Author

jp1995 commented Jul 6, 2023

Okay so I tested with yay with the configured options --noconfirm --needed --cleanafter and it indeed does not rebuild, --cleanafter removes the sources but

==> Extracting sources...
    -> Extracting units-2.22.tar.gz with bsdtar
==> Sources are ready.
    -> units-2.22-2 already made -- skipping build 

In this case it would be still nice to report a change as the package was not previously available for use, and now is. This would be good to test handlers, for example.

I might try to do a PR tomorrow.

jp1995 added a commit to jp1995/ansible-aur that referenced this issue Jul 7, 2023
kewlfft added a commit that referenced this issue Jul 8, 2023
@jp1995 jp1995 closed this as completed Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant