Look for provides matches before direct matches when finding packages
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
ba1a39874e
commit
f32dddee63
@ -36,7 +36,7 @@ func FindPkgs(ctx context.Context, pkgs []string) (map[string][]db.Package, []st
|
||||
continue
|
||||
}
|
||||
|
||||
result, err := db.GetPkgs(ctx, "name LIKE ?", pkgName)
|
||||
result, err := db.GetPkgs(ctx, "json_array_contains(provides, ?)", pkgName)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
@ -55,7 +55,7 @@ func FindPkgs(ctx context.Context, pkgs []string) (map[string][]db.Package, []st
|
||||
result.Close()
|
||||
|
||||
if added == 0 {
|
||||
result, err := db.GetPkgs(ctx, "json_array_contains(provides, ?)", pkgName)
|
||||
result, err := db.GetPkgs(ctx, "name LIKE ?", pkgName)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user