Fix aptly serve: correct components list. #36

This commit is contained in:
Andrey Smirnov
2014-06-03 17:25:15 +04:00
parent 7192049c16
commit e161313efa
2 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -10,6 +10,7 @@ import (
"net/http"
"os"
"sort"
"strings"
)
func aptlyServe(cmd *commander.Command, args []string) error {
@@ -74,11 +75,11 @@ func aptlyServe(cmd *commander.Command, args []string) error {
}
fmt.Printf("# %s\ndeb http://%s:%s/%s %s %s\n",
repo, listenHost, listenPort, prefix, repo.Distribution, repo.Component)
repo, listenHost, listenPort, prefix, repo.Distribution, strings.Join(repo.Components(), " "))
if utils.StrSliceHasItem(repo.Architectures, "source") {
fmt.Printf("deb-src http://%s:%s/%s %s %s\n",
listenHost, listenPort, prefix, repo.Distribution, repo.Component)
listenHost, listenPort, prefix, repo.Distribution, strings.Join(repo.Components(), " "))
}
}