mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-08 22:30:41 +00:00
Exclude "source" architecture from list of Release architectures. #140
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user