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" "net/http"
"os" "os"
"sort" "sort"
"strings"
) )
func aptlyServe(cmd *commander.Command, args []string) error { 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", 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") { if utils.StrSliceHasItem(repo.Architectures, "source") {
fmt.Printf("deb-src http://%s:%s/%s %s %s\n", 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(), " "))
} }
} }
+2 -2
View File
@@ -1,8 +1,8 @@
Serving published repositories, recommended apt sources list: Serving published repositories, recommended apt sources list:
# ./maverick (main) [amd64, i386] publishes [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick # ./maverick [amd64, i386] publishes {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}
deb http://127.0.0.1:8765/ maverick main deb http://127.0.0.1:8765/ maverick main
# debian/maverick (main) [amd64, i386, source] publishes [snap2]: Snapshot from mirror [gnuplot-maverick-src]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick [src] # debian/maverick [amd64, i386, source] publishes {main: [snap2]: Snapshot from mirror [gnuplot-maverick-src]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick [src]}
deb http://127.0.0.1:8765/debian/ maverick main deb http://127.0.0.1:8765/debian/ maverick main
deb-src http://127.0.0.1:8765/debian/ maverick main deb-src http://127.0.0.1:8765/debian/ maverick main