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.
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.
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.
--ask is no longer used when installing AUR packages, instead pass no
confirm when we know there are no conflicts and wait for manual
confirmation when there are.
This means that when there are no conflicts there should be no change in
behaviour and the user will not need to intervene at all.
The old behaviour can still be used with --useask.
When upgrading multiple packages that are already installed we should
not conflict with already installed packages that are in the depPool.
This is because the version in the depTree is going to replace the
currently installed version of the package and may have different
conflicts.
If there is a conflict between stuff in the depPool these should be
handled by the innerConflicts check anyway.
We dont check the dependencies of things already installed becuase,
well, they're already installed. But we should check the dependencies of
targets even if they are installed because they get reinstalled.
This is a rewrite of the dependency system, It aims to be cleaner
written, with a better idea of what is needed from the start, meaning
less new code being hacked on for things that were not thought about.
This version also aims to use as many small functions as possible, for
cleaner code and better testing.
Added dep.go:
general dependency functions
Added depPool.go:
Replacement of depTree, dependencies were never ordered so
a tree did not really make sense. Instead the term pool
makes more sense.
Added depOrder.go:
Replacement of depCatagories, This simply orders the
dependencies, dependencies are still catagorized as repo and AUR
but I believe this to be a better name
Added depCheck.go:
Replaces conflicts.go and also contains the missing dependency
code
This version is mostly the same as the old version with a few
improvments:
Missing packages will print the full dependency tree
Versioned dependency checking errors should be fixed
Make depends should be calculated properly
Experimental AUR provide searcher
This code has been added along side the old code for testing and is not
currently used by the install process. Once the install process is moved
to use this code, the old code will be removed.