Commit Graph

13 Commits

Author SHA1 Message Date
morganamilo
7702a88ebb
Print conflicts in order of install
This is usefull for inner conflicts, you can follow when packages will
be swapped out with others.
2018-10-13 18:24:22 +01:00
morganamilo
f648697994
Rework inner conflicts
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.
2018-10-13 17:04:22 +01:00
morganamilo
5080e400e1
Remove printing conflict name in conflicts
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.
2018-10-13 17:04:22 +01:00
morganamilo
ff4f076d57
Move depSolver checks back to depCheck.go 2018-10-13 17:04:22 +01:00
morganamilo
a83f8fb9e8
Remove depPool and depOrder code 2018-10-13 17:04:21 +01:00
morganamilo
3861aef502
Don't abort on inner conflicts
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.
2018-10-10 16:31:55 +01:00
morganamilo
1d17940ce9
Abort ealy when there's conflicts with --noconfirm
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.
2018-07-20 20:42:47 +01:00
Anna
d6b862357d Replace gopkgbuild with go-srcinfo (#528)
* Prefer vercmp over gopkgbuild

* Replace gopkgbuild with go-srcinfo
2018-07-16 15:28:18 +01:00
morganamilo
ea5a94e0f8
Remove default usage of --ask
--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.
2018-06-22 15:17:34 +01:00
morganamilo
943b2f931a
Tweak missing packages text 2018-05-30 04:06:29 +01:00
morganamilo
6e990e4dc5
Don't conflict with pkgs that are in the depPool
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.
2018-05-29 13:15:45 +01:00
morganamilo
7b558ba47c
Fix check for missing dependencies
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.
2018-05-29 13:13:33 +01:00
morganamilo
b2d3eb5c49
Add new dependency code to replace the old code
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.
2018-05-29 13:13:27 +01:00