diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2024-05-19 21:20:23 +0300 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2024-05-19 21:20:23 +0300 |
commit | 807e98487b716d44a21a69e4a9bafe733b1cf7d0 (patch) | |
tree | 6d260e55e27d8950f629ffc81e458bdd30bcf6a5 /pkg/app | |
parent | bugs: show all general bugs (diff) | |
download | soko-807e98487b716d44a21a69e4a9bafe733b1cf7d0.tar.gz soko-807e98487b716d44a21a69e4a9bafe733b1cf7d0.tar.bz2 soko-807e98487b716d44a21a69e4a9bafe733b1cf7d0.zip |
arches/leaf-packages: fix for included arches
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'pkg/app')
-rw-r--r-- | pkg/app/handler/arches/utils.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/app/handler/arches/utils.go b/pkg/app/handler/arches/utils.go index 8144a3d..9f4847e 100644 --- a/pkg/app/handler/arches/utils.go +++ b/pkg/app/handler/arches/utils.go @@ -59,10 +59,10 @@ func getLeafPackagesForArch(arch string) ([]string, error) { var atoms []string atomsWithReverse := database.DBCon.Model((*models.ReverseDependency)(nil)). Join("JOIN versions").JoinOn("reverse_dependency.reverse_dependency_atom = versions.atom"). - Where("keywords LIKE ?", "%"+arch+"%"). + Where("? = ANY(STRING_TO_ARRAY(keywords, ' '))", arch). ColumnExpr("DISTINCT reverse_dependency.atom") err := database.DBCon.Model((*models.Version)(nil)). - Where("keywords LIKE ?", "%"+arch+"%"). + Where("? = ANY(STRING_TO_ARRAY(keywords, ' '))", arch). Where("atom NOT IN (?)", atomsWithReverse). Order("atom"). ColumnExpr("DISTINCT atom"). |