mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-07 22:20:24 +00:00
Fix bug with matching in Search method.
This commit is contained in:
+1
-4
@@ -352,7 +352,7 @@ func (l *PackageList) Search(dep Dependency, allMatches bool) (searchResults []*
|
||||
|
||||
if dep.Relation == VersionDontCare {
|
||||
for _, p := range l.providesIndex[dep.Pkg] {
|
||||
if p.MatchesArchitecture(dep.Architecture) {
|
||||
if dep.Architecture == "" || p.MatchesArchitecture(dep.Architecture) {
|
||||
searchResults = append(searchResults, p)
|
||||
|
||||
if !allMatches {
|
||||
@@ -360,9 +360,6 @@ func (l *PackageList) Search(dep Dependency, allMatches bool) (searchResults []*
|
||||
}
|
||||
}
|
||||
}
|
||||
if len(searchResults) != 0 {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
i := sort.Search(len(l.packagesIndex), func(j int) bool { return l.packagesIndex[j].Name >= dep.Pkg })
|
||||
|
||||
Reference in New Issue
Block a user