diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2024-05-19 22:48:10 +0300 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2024-05-19 22:48:10 +0300 |
commit | 1be7d34c81b0fff039494b87f96fa8b71873ba2f (patch) | |
tree | 416f27a4193ec5fae0e055125575d0924e740080 /pkg/app/handler | |
parent | arches/leaf-packages: fix for included arches (diff) | |
download | soko-1be7d34c81b0fff039494b87f96fa8b71873ba2f.tar.gz soko-1be7d34c81b0fff039494b87f96fa8b71873ba2f.tar.bz2 soko-1be7d34c81b0fff039494b87f96fa8b71873ba2f.zip |
arches/leaf-packages: fix for included arches
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'pkg/app/handler')
-rw-r--r-- | pkg/app/handler/arches/utils.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/app/handler/arches/utils.go b/pkg/app/handler/arches/utils.go index 9f4847e..686e3f0 100644 --- a/pkg/app/handler/arches/utils.go +++ b/pkg/app/handler/arches/utils.go @@ -60,9 +60,11 @@ func getLeafPackagesForArch(arch string) ([]string, error) { atomsWithReverse := database.DBCon.Model((*models.ReverseDependency)(nil)). Join("JOIN versions").JoinOn("reverse_dependency.reverse_dependency_atom = versions.atom"). Where("? = ANY(STRING_TO_ARRAY(keywords, ' '))", arch). + WhereOr("? = ANY(STRING_TO_ARRAY(keywords, ' '))", "~"+arch). ColumnExpr("DISTINCT reverse_dependency.atom") err := database.DBCon.Model((*models.Version)(nil)). Where("? = ANY(STRING_TO_ARRAY(keywords, ' '))", arch). + WhereOr("? = ANY(STRING_TO_ARRAY(keywords, ' '))", "~"+arch). Where("atom NOT IN (?)", atomsWithReverse). Order("atom"). ColumnExpr("DISTINCT atom"). |