Look for provides matches before direct matches when finding packages
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
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
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
result, err := db.GetPkgs(ctx, "name LIKE ?", pkgName)
|
result, err := db.GetPkgs(ctx, "json_array_contains(provides, ?)", pkgName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ func FindPkgs(ctx context.Context, pkgs []string) (map[string][]db.Package, []st
|
||||||
result.Close()
|
result.Close()
|
||||||
|
|
||||||
if added == 0 {
|
if added == 0 {
|
||||||
result, err := db.GetPkgs(ctx, "json_array_contains(provides, ?)", pkgName)
|
result, err := db.GetPkgs(ctx, "name LIKE ?", pkgName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue