When building a package from the AUR for which there are missing keys,
yay will now prompt the user whether it should try to import such keys
using gpg:
[...]
:: Parsing SRCINFO (1/3): libc++ (libc++abi libc++)
:: Parsing SRCINFO (2/3): aurutils
:: Parsing SRCINFO (3/3): cower
==> GPG keys need importing:
487EACC08557AD082088DABA1EB2638FF56C0C53, required by: cower
11E521D646982372EB577A1F8F0871F202119294, required by: libc++ (libc++abi libc++)
B6C8F98282B944E3B0D5C2530FC3042E345AD05D, required by: libc++ (libc++abi libc++)
DBE7D3DD8C81D58D0A13D0E76BC26A17B9B7018A, required by: aurutils
==> Import? [Y/n]
[...]
Default is to try to import the problematic keys ([Y/n]).
Adds the ability to pick which database to install a package from. This
is extended to also support for AUR packages. For example `extra/git`
and `aur/yay` should both work`. When not explicitly requesting
a database repo packages will be choosen over the AUR.
This features extends to yogurt mode, listings where a package shows up
in multiple database/the AUR is now handled.
The aur does not have a real pacman databse like core, extra ect. But
can be accessed as if was one with `aur/name`. Using Yay with a pacman
repository named "aur" is undefined.
If a pkgbuild is already in cache and matches the version on
the aur skip the download.
The version we check comes from the .SRCINFO file on disk which is never
updated. (updates through pkgver() edit the pkgbuild but do not effect
the .SRCINFO). Therefore if the the version of the .SRCINFO matches the
AUR's version there must not be an update.
In the case of the on disk version being newer than the AUR version we
can assume user interaction and they probably do not want it overwitten
so in that case also skip the download.
Use the command `git ls-remote <url> <branch>` to track devel updates
rather than relying on the GitHub API.
This allows devel update to work for every git based source and
elimantes the rate limiting from GitHub.
The yay_vcs.json format has changed to better support packages which
multiple vcs sources and to track the protocols each source uses. And
track the branch that each source tracks in it's fragment.
In a very specific case where the user runs `yay -Syu` then uses the
number menu to ignore all AUR upgrades after the Repo install the user
will still be prompted to install and download packages.
Add ( and ) to "installed" to match groups and out of date
Show popularity as well as voted in yogurt mode
Show download and install size in yogurt mode
Remove printing of white and black
Fix incorrect message on number menu
Yellow is now almost never used
Use `v` instead of `r` when printing version
show when a page was marked out of date on search and info
Previously Installing repo targets and repo dependencies of aur targets
was done in two steps.
doing `yay -S repo1 repo2 aur1 aur2` would lead to yay calling
`pacman -S repo1 repo2`. Then after we find all the dependencies of the
aur packages we call `pacman -S --asdeps <all repo dependencies>`. This
was an easy way to correctly mark dependencies. Since 005635b4 Both
these calls were merged into one command but dependency marking was
forgoten about.
Now correctly mark the dependencies through `pacman -D`
This allows the user to abort the install by telling the editor to exit
with a non zero status. e.g. `:cq` in vim. This should also catch errors
if the editor does actually fail or if the configured editor does not
exist.
Save the VSC Info as soon as the package install finishes. This should
ensure the VSC db does not end up in an incorrect state if an install
fails or is cancelled by the user.
This also adds better support for split packages. When one or more
packages are installed from the same base each individual package is
added to the db not just the base. This allows us to track individual
updates from the same base so that if one package gets updated we don't
assume all packages in the base are updated.
The -s was kept aroung because the package base `python-virtualfish`
failed to build without it. I first blamed this on some aur rpc bug
because it was missing some deps that were listed in python-virtualfish.
As is turned out python-virtualfish actually does some things wrong in
it's package build and if it was formated correctly this wouldnt be
a problem.
I kept the -s in just so it would build even though it might have had
some side affects. makepkg not respecting the --dbpath for example.
From now on python-virtualfish will fail to build when you dont have all
the deps installed. This is their fault and will not be fixed here.
Exit after parsing srcinfo with db do it actually does something.
when using gendb dont bother generating srcinfos.
Improved the formatting for some things mainly downloading and parsing.
This commit mostly focuses on merging the install() and upgradePkgs()
functions to be more integrated. Instead of both making their own aur
queries they now both combine theyre needes into one query. This gives
us a speed up and allows us to easily print orphands, misising and out
of date in one clean block.
Renable conflict checking, was disabled for testing, forgot to reenable
Use pacman --ask to remove conflicting packages, dont do it directly.
Say what each package conflicts with
Check for conflicts before aking for clean build
Reverse conflict are still not checked
Split packages are now grouped together when printing displaying the
package base and the packages inside of the base to beinstalled. If only
one packge is to be installed from a base and the package name matches
the base name print normally
Only build and install once per package base
Only ask questions once per package base for editing pkgbuils and clean
build
Install all deps for aur packages after the user confirms they want to
continue installing. This takes most of the load off of makepkg -s but
the -s is still left in for some edge cases with split packages.
When installing a package might be a dependancy for something and a make
dependancy for something else. This means when prompted to remove make
dependencies yay might also try to remove a package that is actually
needed causing a pacman error.
Adding the -u option will cause pacman to skip needed packages and give
a nice warning as it does so. It does not fix the root issue but works
for now.
I have replaced the old install and dependancy algorithms with a new
design that attemps to be more pacaur like. Mostly in minimizing user
input. Ask every thing first then do everything with no need for more
user input.
It is not yet fully complete but is finished enough so that it works,
should not fail in most cases and provides a base for more contributors
to help address the existing problems.
The new install chain is as follows:
Source info about the provided targets
Fetch a list of all dependancies needed to install targets
I put alot of effort into fetching the dependancy tree
while making the least amount of aur requests as
possible. I'm actually very happy with how it turned out
and yay wil now resolve dependancies noticably faster
than pacaur when there are many aur dependancies.
Install repo targets by passing to pacman
Print dependancy tree and ask to confirm
Ask to clean build if directory already exists
Download all pkgbuilds
Ask to edit all pkgbuilds
Ask to continue with the install
Download the sources for each packagebuild
Build and install every package
using -s to get repo deps and -i to install
Ask to remove make dependancies
There are still a lot of things that need to be done for a fully working
system. Here are the problems I found with this system, either new or
existing:
Formating
I am not so good at formatting myself, I thought best to
leave it until last so I could get feedback on how it
should look and help implementing it.
Dependancy tree
The dependancy tree is usually correct although I have
noticed times where it doesnt detect all the
dependancies that it should. I have only noticed this
when there are circular dependancies so i think this
might be the cause. It's not a big deal currently
because makepkg -i installed repo deps for us which
handles the repo deps for us and will get the correct
ones. So yay might not list all the dependancies. but
they will get installed so I consider this a visual bug.
I have yet to see any circular dependancies in the AUR
so I can not say what will happend but I#m guessing that
it will break.
Versioned packages/dependencies
Targets and dependancies with version constriants such
as 'linux>=4.1' will not be checked on the aur side of
things but will be checked on the repo side.
Ignorepkg/Ignoregroup
Currently I do not handle this in any way but it
shouldn't be too hard to implement.
Conflict checking
This is not currently implemented either
Split Paclages
Split packages are not Handles properly. If we only
specify one package so install from a split package
makepkg -i ends up installing them all anyway. If we
specify more than one (n) package it will actually build the
package base n times and reinstall every split package
n times.
Makepkg
To get things working I decided to keep using the
makepkg -i method. I plan to eventually replace this
with a pacman -U based method. This should allow passing
args such as --dbpath and --config to aur packages
aswell as help solve some problems such as the split
packages.
Clean build
I plan to improve the clean build choice to be a little
more smart and instead of check if the directory exists,
check if the package is already build and if so skip the
build all together.
This bug was caused by me not thinking when passing flags to aurInstall.
Currently a bunch of functions take an array of flags but we don't really
use them any more after the argument parsing update. These should be
refactored out eventually but I'm holding off until I'm more sure about
how these functions should look.