You are not logged in.
Pages: 1
I am making a widget for KDE plasma that counts the result of "pacman -Sup" and I realized that if I don't do "sudo pacman -Syu" before, the total is not necessarily updated.
Is my observation correct?
If yes, is it possible to update the db without using sudo or asking the user for his password?
Knowing that I just want to be able to retrieve the result of the command "pacman -Sup", I don't want to install anything instead of the user.
Thank you.
Last edited by a2n (2022-11-20 16:01:07)
Offline
Offline
Offline
Ok I found this answer on the wiki, and, for no reason I thought it was installed with pacman.
Since the command did not work, I did not look any further. I'm tired I guess haha.
Thanks !
Offline
If you only want to count updates, you can use checkupdates command from pacman-contrib package. Set the CHECKUPDATES_DB environment variable to specify the database path if you wish.
Check my script updates.sh and _cu() function for examples.
Otherwise, check the source of the /usr/bin/checkupdates script for examples on how to run pacman as non-root.
Last edited by karabaja4 (2022-11-20 16:09:32)
Offline
Pages: 1