diff options
-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"). |