mirror of
https://github.com/Jguer/yay.git
synced 2025-12-06 00:02:43 -05:00
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.
This commit is contained in:
parent
d51205194e
commit
6e990e4dc5
@ -33,7 +33,7 @@ func (dp *depPool) checkInnerConflict(name string, conflict string, conflicts ma
|
|||||||
|
|
||||||
func (dp *depPool) checkForwardConflict(name string, conflict string, conflicts mapStringSet) {
|
func (dp *depPool) checkForwardConflict(name string, conflict string, conflicts mapStringSet) {
|
||||||
dp.LocalDb.PkgCache().ForEach(func(pkg alpm.Package) error {
|
dp.LocalDb.PkgCache().ForEach(func(pkg alpm.Package) error {
|
||||||
if pkg.Name() == name {
|
if pkg.Name() == name || dp.hasPackage(pkg.Name()) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,6 +111,10 @@ func (dp *depPool) checkForwardConflicts(conflicts mapStringSet) {
|
|||||||
|
|
||||||
func (dp *depPool) checkReverseConflicts(conflicts mapStringSet) {
|
func (dp *depPool) checkReverseConflicts(conflicts mapStringSet) {
|
||||||
dp.LocalDb.PkgCache().ForEach(func(pkg alpm.Package) error {
|
dp.LocalDb.PkgCache().ForEach(func(pkg alpm.Package) error {
|
||||||
|
if dp.hasPackage(pkg.Name()) {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
pkg.Conflicts().ForEach(func(conflict alpm.Depend) error {
|
pkg.Conflicts().ForEach(func(conflict alpm.Depend) error {
|
||||||
dp.checkReverseConflict(pkg.Name(), conflict.String(), conflicts)
|
dp.checkReverseConflict(pkg.Name(), conflict.String(), conflicts)
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user