Use special matcher for $Architecture, so that 'any' matches any arch.

This commit is contained in:
Andrey Smirnov
2014-07-14 19:39:19 +04:00
parent 401bb768d7
commit 61cd4c6af1

View File

@@ -116,6 +116,9 @@ func (q *FieldQuery) Matches(pkg *Package) bool {
if q.Field == "$Version" {
return pkg.MatchesDependency(Dependency{Pkg: pkg.Name, Relation: q.Relation, Version: q.Value})
}
if q.Field == "$Architecture" && q.Relation == VersionEqual {
return pkg.MatchesArchitecture(q.Value)
}
field := pkg.GetField(q.Field)