aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2024-05-19 22:48:10 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2024-05-19 22:48:10 +0300
commit1be7d34c81b0fff039494b87f96fa8b71873ba2f (patch)
tree416f27a4193ec5fae0e055125575d0924e740080
parentarches/leaf-packages: fix for included arches (diff)
downloadsoko-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>
-rw-r--r--pkg/app/handler/arches/utils.go2
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").