Add 'deb-src' line to repos with source packages included.

This commit is contained in:
Andrey Smirnov
2014-02-17 13:29:19 +04:00
parent 54ac38c56b
commit 09a1b60946
+6
View File
@@ -5,6 +5,7 @@ import (
"github.com/gonuts/commander"
"github.com/gonuts/flag"
"github.com/smira/aptly/debian"
"github.com/smira/aptly/utils"
"net"
"net/http"
"os"
@@ -72,6 +73,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)
if utils.StrSliceHasItem(repo.Architectures, "source") {
fmt.Printf("deb-src http://%s:%s/%s %s %s\n",
listenHost, listenPort, prefix, repo.Distribution, repo.Component)
}
}
context.database.Close()