It would be nice if when running pacman it would do a -Syu without asking for password until you answer Y.
What’s the point of a password if there is nothing to do.
Even yay will ask for password even when later there is nothing to do.
But when you use yay pkgname an take a choice I believe that it won’t as for a password until it comes time for install.
Endeavour’s Software update from Xfce Setting window won’t as for password until there is a update and you press Apply.
On the other hand, the checkupdates script does not refresh your package database, so it does not need elevated privileges. So you can use that to safely check for updates, without refreshing your local package database.
Not to be crude but how does the Endeavour work? It does say checking for updates and oft time it will find an update.
And why would it need super privs’ just to check if there is an update?
You mean the eos-update-notifier? It uses the checkupdates script for the repos, plus yay -Qua for the AUR.
Just checking if there is an update does not need sudo privileges.
But pacman -Syu does not simply check if there is an update, it does more than that, so it needs sudo privileges even before you answer yes to update.
If you tell pacman to do something that does not need sudo privileges, like search for a package in the repos (pacman -Ss package-name) or print info about an installed package (pacman -Qi package-name) it will happily do that without sudo.
Just to reiterate this, if you just want to check for updates then use checkupdates. It’s a useful habit to get into instead of just syncing the database.
Which is exactly my point. The person who wrote pacman insisted that it ask for a password when indeed there is no need to; just when you answer Y to the update otherwise why bother with a password.
If you think pacman should behave in another way, the best place for such requests is: https://bbs.archlinux.org.
There exists a separate area for pacman discussions.
First the database is refreshed, then the updates are checked, then you’re prompted to continue installing updates, and if you reply with yes, the updates are downloaded and installed.
This is understandable, but what is the difference between synchronizing a database and updating a database? Pacman -Syu, by definition, synchronizes, among other things.
Pacman manual calls it “refresh”. It downloads a copy of the master package database from the servers and saves it on you system. This is how it knows which packages need to be updated.
S is the synchronise operation, which it takes y (database refresh) and u (sysupgrade) as options (among others).
So actually this process means synchronization. It is only a question of interpretation that has arisen in me in connection with the subject. However, if you use the checkupdates script, there is no database update, so how do you find out if there are any available package updates?
That seems logical. I think after rebooting the contents of the temporary location will be deleted. Thus, it is understood that checkupdates only asks for the password to install the packages, while pacman -Syu asks for the password immediately after issuing the command. The question is what would happen to pacman -u, if there were such a combination.