This ensures AUR packages are always installed in the order specified by
the user. In the case there are any inner conflicts packages will be
removed in a predictable way.
Inner conflicts now check against the previously installed aur packages
For example when installing yay, yay-bin and yay-git
yay will be checked the previously insalled packages (nothing)
yay-bin will be checked the previously insalled packages and see that it
conflicts with yay and warn you that yay will be removed
yay-git will be checked the previously insalled packages and see that it
conflicts with yay but see that it has already been removed by yay-bin
so does nothing. Then it will see that it conflicts with yay-bin and
warn you that yay-bin will be removed
This example is unlikley to happen unless the user enters
`yay -S yay yay-bin yay-git`. But where this does happen is packages
which have some sort of bootsrapping process such as ffmpeg-libfdk_aac.
If two repo packages conflict then we abort. This is because they will
be installed at the same time and we never swap repo packages mid AUR
install.
Currently when printing conflicts the package name is printed and then
name of the conflict if it differs from the package name.
For example if yay-git is installed and you are installing yay-bin:
yay-bin conflicts with yay
yay-git provides yay
so the conflict is printed as "yay-bin (yay)"
This is not too bad but some packages have many provides and conflicts
that ends up cluttering the output.
For example if gvim is installed and you are installing vim:
"gvim, gvim (vim-minimal), gvim (vim)" is printed
Just printing the package name should be enough information. If not the
user can always -Si either package.
merge both dependency resolving parts into depSolver. The name was
choosen simply to not colide with the current code.
depSolver works but it not implemented in the install process and is
missing conflict checking.
Currently there may be times where there are inner conflicts but the
install would go okay as packages will be swapped out as they go. Warn
the user but leave it up to them if they want to continue.
Comit 2d6fe95903 renamed the Yay specific
flag -P/--print to -P/--show. The rename caused --print to stop being
accepted as it was no longer in the list of accepted args.
isArg() was generated from pacman's manpage using a script. All dashes
were stripped out. Some flags used '-' as a seperator and were stripped
out by mistake.
Previously it was assumed that "git+https" means: use git and if that
fails fall back to https. What this actually means is just: use git over
https. Similary "git" just means use git and "git+http" means use git
over http.
Thus there is only ever one protocol to use. The current protocols array
has been kept for backwards compatibility with the vcs.json file. The
difference being now it will only ever place one protocol into the
array. Also when reading the array, the last protocol is always used.
This is so that entries that have not been regenerated will use the
correct protocol.
This makes more sense and falls in line with the structs value which has
always been cleanafter. afterclean is still useable for compatibility
but is undocumented.
Yay first calls 'makepkg --nobuild -fC' to update the pkver. Later on we
call 'makepkg -cf --noectract --noprepare --holdver' to actually build
the package.
Inbetween these two calls we keep the already extracted
sources to save time on the reextract and duplicated call to prepare
(pkgbuilds should not require user input but things such as linux-ck do
and calling prepare twice will actually cause them to promt twice)
We also have two checks. First we see if the package is already
installed and up to date (--needed) and secondly we check if the
package is already built.
If any of these conditions are met we skip building the package. This
leaves a dangling src/ directory as 'makepkg -c' was never ran.
Now if these conditions are met tell makepkg to cleanup and exit.
If the package is already installed, we need to check if it is in the
repos to see if it aplies to rebuild tree. Normally alpm will not prompt
us to select a provider if we already have one installed. An exception
comes up when we have a provider installed that is from the AUR. In this
case FindSatisfier() still asks us to select a provider.
Now make sure to never to never show the menu if the package exists in
the local repo.
Previous default SigLevels caused 3rd party databases to take a very long time to
load and also to not load properly. Probably due to missing keys(?).
Pacman takes a long time to check the databases. For now, always set to
SigLevel 0 like how go-alpm did in its config parsing. Needs more
looking into for a proper fix.