Skip to content

Commit 8ce89e7

Browse files
authored
Improve conflict error (#1529)
The newly added path that fails when we're picking something that conflicts with something we already selected would do name=version instead of using the original constraint, which means it's wrong in cases where we use e.g. `<`. Before: │ we already selected "ruby3.2-fluentd-1.18"="1.18.0-r1" which conflicts with "ruby3.2-fluentd"="1.18" After: │ we already selected "ruby3.2-fluentd-1.18=1.18.0-r1" which conflicts with "ruby3.2-fluentd<1.18" Signed-off-by: Jon Johnson <[email protected]>
1 parent d47f064 commit 8ce89e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/apk/apk/repo.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ func (p *PkgResolver) getPackageDependencies(ctx context.Context, pkg *Repositor
793793
}
794794

795795
// We already selected something to satisfy "name" and it does not match the "version" we need now.
796-
return nil, nil, fmt.Errorf("we already selected %q=%q which conflicts with %q=%q", picked.Name, picked.Version, name, version)
796+
return nil, nil, fmt.Errorf("we already selected \"%s=%s\" which conflicts with %q", picked.Name, picked.Version, dep)
797797
}
798798

799799
// first see if it is a name of a package

0 commit comments

Comments
 (0)