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.
This commit is contained in:
morganamilo 2018-10-12 21:49:32 +01:00
parent ff4f076d57
commit 5080e400e1
No known key found for this signature in database
GPG key ID: 6FE9E7996B0B082E

View file

@ -128,9 +128,6 @@ func (ds *depSolver) checkForwardConflict(name string, conflict string, conflict
if satisfiesRepo(conflict, &pkg) {
n := pkg.Name()
if n != conflict {
n += " (" + conflict + ")"
}
conflicts.Add(name, n)
}
@ -146,10 +143,6 @@ func (ds *depSolver) checkReverseConflict(name string, conflict string, conflict
}
if satisfiesAur(conflict, pkg) {
if name != conflict {
name += " (" + conflict + ")"
}
conflicts.Add(pkg.Name, name)
}
}
@ -161,10 +154,6 @@ func (ds *depSolver) checkReverseConflict(name string, conflict string, conflict
}
if satisfiesRepo(conflict, pkg) {
if name != conflict {
name += " (" + conflict + ")"
}
conflicts.Add(pkg.Name(), name)
}
}