Architecture parsing, package list from reflist.

This commit is contained in:
Andrey Smirnov
2014-01-09 14:18:37 +04:00
parent 4e2fce7251
commit f168feb9b8
3 changed files with 65 additions and 7 deletions
+1 -7
View File
@@ -66,13 +66,7 @@ func (p *PublishedRepo) Publish(repo *Repository, packageCollection *PackageColl
}
if p.Architectures == nil {
p.Architectures = make([]string, 0, 10)
list.ForEach(func(pkg *Package) error {
if pkg.Architecture != "all" && !utils.StrSliceHasItem(p.Architectures, pkg.Architecture) {
p.Architectures = append(p.Architectures, pkg.Architecture)
}
return nil
})
p.Architectures = list.Architectures()
}
if len(p.Architectures) == 0 {