To know what AUR packages need updating a rpc request is needed for all
packages. The dep tree is designed to cache everything to minimize the
amount of rpc requests. The downside of this is the dep tree ends up
with all sorts of packages in cache that it doesn't need. Then the
deptree tries to resolve deps for all of thoes packages.
By spliting the sysupgrade from the dep tree this stops this from
happening, it uses one more rpc request but also may lower the amount of
total rpc requests needed lated on.
This fixes a couple of tiny bugs such as triggering providers prompts
and printing AUR out of date messages for packages that are not going
to be installed.
This also fixes another display bug where repo packages from -Su would
not apear when printing the packages to be installed under [Repo].
Devel packages can't be trusted to sho their real provides. Pretend that
that the provide applies to all versions. In the rare case where the
dependency is unsatisfied pacman will refuse to install so no harm can
be caused.
When printing the upgrade menu, sort the repos in the order they are
defined in pacman.conf (or more technically, the order they are
registered in alpm). Packages in the same repo are still sorted
alphabetically.
If a repo is not in pacman.conf or the database query fails it will
fallback to alphabetical.
add22f5957 added error checks to all the
passToPacman commands. This makes `yay -Q nonexistantpackage` return
non 0 as it should. Annoyingly it also made yay print `exit status = n`
which is the error string from passToPacman calls. This error doesn't
add much and is quite annoying, expecially when calling pacman commands
like `-Q` or `-Si` where yay should be kind of 'hidden' and print just
like pacman does.
Now set the error string to "" for pacman commands and don't print an
error if it == "" (avoids empty line printed).
Also behave more like pacman when using `yay -Qu`.
We now mock a PGP key server to provide the keys used during the
testing, making it so that we do not need the Internet anymore for
the testing of the PGP key import feature.
--redownload is meant to only download the targets the user provides.
If the user enters aur/foo then Yay will find the package foo from the
aur, --redownload will see thats not what the user entered and skips the
download.
This makes it so after the dep searching is done, all db/ prefixes are
dropped.
Created .go/src which symlinks to vendor/. Running `make` now builds
yay using the packages in vendor. This can still be overiden by running
`make GOPATH=$HOME/go`
Even though the makefile calls git to get the version, that can be
overiden using `make MAJORVERSION=5 MINORVERSION=400`, skipping the call to git. This
allows building yay/yay-bin using the makefile
The yay binary is now always yay instead of taking the name of the
parent directory.
Added vet and fmt checks to `make test` for more checking.
Reordered some stuff, made sure the dependency order is correct. Any
command such as `make package` can be ran at any point, even after a
`make clean` instead of having to execute the correct make commands in
order.
Changed install form using `go install` to a traditional install. The
pkgbuilds can now use `make DESTDIR=$PKGDIR install`. Added uninstall to match.
One thing this commit does not do is have proper recepies which depend
on files instead of phonies. The reason for this is that it does not
play that well with go's build system. Go is smart enough to only
recompile needed files anyway.