From 09a1b6094655025ccd47018399b2cef5dbcf55b6 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Mon, 17 Feb 2014 13:29:19 +0400 Subject: [PATCH] Add 'deb-src' line to repos with source packages included. --- cmd_serve.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd_serve.go b/cmd_serve.go index f1a385aa..7e3a24b7 100644 --- a/cmd_serve.go +++ b/cmd_serve.go @@ -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()