Normaly we only pass --config to pacman if the user specifies it on the
command line. Otherwise we let pacman use it's default config location.
If the user has changed pacmanconf in Yay's config file then this could
cause a miss match between the config we use to init alpm and the config
pacman is using.
This allows us to support the Upgrade Usage option as well as relying on
alpm's logic instead of coming up with out own.
It is possible that this could lead to showing replaces in the upgrade
menu.
Bash seperates on whitespace, so the fish completion file
actually works for bash and zsh. So remove the concept of shells
entirley and just use the singular aur_sh.cache file.
If for some reason output without the repository data is needed, the
user could always just pipe it into awk like so
`yay -Pc | awk '{print $1}'`. Or perhaps a --quiet option could be added
where yay will strip the output itself.
The completion cache now updates when installing AUR packages. This is
done as a goroutine with no wait groups. This ensures the program will
never hang if there is a problem.
The completion is stil updated during -Pc but as long as an AUR package
has been installed recently it should not need to update.
The cache will now also wait 7 days instead of 2 before refreshing.
A refresh can be forced using -Pcc.
Currently we do not handle -Sp, this leads to yay trying a proper
install and failing. So instead pass it to pacman and exit. Ideally we
would extend -Sp to include AUR packages but for now don't bother.
When using nocombinedupgrade "there is nothing to do" is printed when
insinstalling repo packages. This is because as far as AUR
installer is concerned, there is nothing to do. Instead only print that
when doing a sysupgrade.
The main reason behind this is for future localisation. yes and no can
be set to the localized equivalent and it should just work.
This Refactor also changes the function in ways which make it much less
confusing.
The param is no longer reversed and changed to a boolean. Before you had
to pass in Yy to get a default of no and vice versa.
The function now retuens false for no and true for yes. Before it would
return true if the default option was choosen.
As it turns out, the times you need root also tend to be the time you
need to manipulate the database. So the needWait() function can be
removed and repllaced by needRoot()
* Wait for db.lck to become available before starting a db operation
* Fix err!=nil issues and avoid spamming users
* Remove redundant cases
* Remove return
When using --nouseask, manual intervention is needed to resolve conflicts.
When also useing --noconfirm the install will always fail. So abort
early, before trying to install any AUR packages.