This commit extends the conflict checking a lot, it adds support for:
Conflicting with provides as well as actual package names
Reverse conflicts
Inner conflicts
Both normal conflicts and inner conflicts are run in parallel.
Messages are now printing when checking conflicts.
This also fixes packages sometimes being listed as conflicting with
themselves.
The inner conflict is a little verbose and could be toned down a little
but I am insure exactly how to tone it down.
Previosly during `yay -Su` Yay would pass
`pacman -S <packages that need upgrade>` to pacman.
Instead pass `pacman -Su --ignore <number menu choices>`
This allows yay to handle replaces and package downgrades `-Suu`
Before the goroutines in upList() were layed out like:
upLists()
|- - - upRepo()
|- - - pAur()
| - - - upDevel()
Simplified by moving upDevel() from upAur() to upList():
upList()
|- - - upRepo()
|- - - upAur()
|- - - upDevel()
With the simpler layout it was easy to then remove some un need channel
useage entirely and use WaitGroups in other places.
Now if any of the three inner functions error, upList() will return
a combined error instead of just printing the error and carrying on.
-Qu now has AUR support, it functions identically to `-Pu` and may replace
it in the futre.
Aditionally the pacman options `-n` and `-m` are also supported to
filter out native and non native packages. Other flags are not supported
currently.
Using any other `-Q` will fallback to Pacman.
Now that install() no longer relies on packageSlices() we can drop the
use of FindSatisfier() so that only direct package names are understood,
this is how pacman -Si works.
This also fixes a small issue where `yay -Si mysql` would fail. This is
because two repo packages provide `mysql`. This causes Yay to not bother
checking the AUR even though there is a package in the AUR called `mysql`
When pkgbuilds are built by makepkg, if the pkgbuild's arch=() array
does not include the current carch set in makepkg.conf, makepkg will
fail to build the package.
Now, Yay detects if a pkgbuild does not support the arch set in
pacman.conf Yay will ask the user about this and ask them if they want
to build anyway, passing `--ignorearch` to makepkg.`
Note that Yay will check against the arch set in pacman.conf which is
what pacman uses to only allow installs of package of that arch. makepkg
will still use carch set in makepkg.conf to build packages. These two
values are expected to be the same otherwise Yay will fail.
The on disk .srcinfo is needed for this as the user should be asked pre
source download. This and pgp checking both use the on disk .srcinfo so
it is no longer a one off. Store the 'stale' srcinfos so they can be
accesed by both functions.
Fix typo where adding to has instead of depStrings
Error correcly when missing packages
Also handle cases where a package is provided multiple times. If one
package provies `foo=1` and another provides `foo=2` before the latter
would just overide the former version. Now both versions will be checked
against.
With the addition of pgp key checking in Yay, the srcinfo parsing was
moved to before the pkgver() bump, leading to outdated pkgbuild
information.
Srcinfo parsing must be done after the pkgver() bump
The pkgver() bump must be done after downloading sources
makepkg's PGP checking is done as the sources download
yays PGP importing requires the srcingo to be parsed
Quite the chicken and egg problem
It is possible to skip the integ checks after the sources download
then parse the srcinfo
do the yay PGP check
then run the integ checks
the problem here is that to generate the srcinfo `makepkg --printsrcingo` is ran
This causes the pkgbuild to be sourced which I am not comftable with
doing without the integ checks.
Instead we parse the on disk .SRRCINFO that downloads with the PKGBUILD
just for the PGP checking. Later on we parse a fresh srcinfo straight
from `makepkg --printsrcingo`. This is a little bit less efficient but
more secure than the other option.