Exclude "source" architecture from list of Release architectures. #140

This commit is contained in:
Andrey Smirnov
2014-11-14 00:01:41 +03:00
parent ccd8c2551f
commit 036baa2264
+4
View File
@@ -14,6 +14,7 @@ import (
"os" "os"
"path" "path"
"path/filepath" "path/filepath"
"sort"
"strconv" "strconv"
"strings" "strings"
"sync" "sync"
@@ -308,6 +309,9 @@ ok:
if !repo.IsFlat() { if !repo.IsFlat() {
architectures := strings.Split(stanza["Architectures"], " ") architectures := strings.Split(stanza["Architectures"], " ")
sort.Strings(architectures)
// "source" architecture is never present, despite Release file claims
architectures = utils.StrSlicesSubstract(architectures, []string{"source"})
if len(repo.Architectures) == 0 { if len(repo.Architectures) == 0 {
repo.Architectures = architectures repo.Architectures = architectures
} else { } else {