From 2ae34cd8730a68f7d45b28c78cb0601ed984a2dd Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Tue, 30 Sep 2014 19:39:31 +0400 Subject: [PATCH] Use Package.MatchesArchitecture instead of homegrown function. #108 --- deb/publish.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/deb/publish.go b/deb/publish.go index b1688492..22b81e21 100644 --- a/deb/publish.go +++ b/deb/publish.go @@ -469,7 +469,15 @@ func (p *PublishedRepo) Publish(packagePool aptly.PackagePool, publishedStorageP 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 err = pkg.LinkFromPool(publishedStorage, packagePool, p.Prefix, component, forceOverwrite) if err != nil {