Use Package.MatchesArchitecture instead of homegrown function. #108

This commit is contained in:
Andrey Smirnov
2014-09-30 19:39:31 +04:00
parent b365e5e0b2
commit 2ae34cd873
+9 -1
View File
@@ -469,7 +469,15 @@ func (p *PublishedRepo) Publish(packagePool aptly.PackagePool, publishedStorageP
progress.AddBar(1) progress.AddBar(1)
} }
if pkg.Architecture == "all" || utils.StrSliceHasItem(p.Architectures, pkg.Architecture) { matches := false
for _, arch := range p.Architectures {
if pkg.MatchesArchitecture(arch) {
matches = true
break
}
}
if matches {
hadUdebs = hadUdebs || pkg.IsUdeb hadUdebs = hadUdebs || pkg.IsUdeb
err = pkg.LinkFromPool(publishedStorage, packagePool, p.Prefix, component, forceOverwrite) err = pkg.LinkFromPool(publishedStorage, packagePool, p.Prefix, component, forceOverwrite)
if err != nil { if err != nil {