diff options
author | KatolaZ <katolaz@freaknet.org> | 2018-06-03 23:45:03 +0100 |
---|---|---|
committer | KatolaZ <katolaz@freaknet.org> | 2018-06-03 23:45:03 +0100 |
commit | e1751ab0a8d8ef7fbc5c69bfd1a14573e6aa080a (patch) | |
tree | 5713403cb6a5faa51067e31d0ec9a1975bf685e4 | |
parent | abb6d2e7e6c0b2567cae220de463bd054e399bb9 (diff) |
added Origin: in package page
-rw-r--r-- | config.go | 7 | ||||
-rw-r--r-- | config.yml | 2 | ||||
-rw-r--r-- | deb822/package.go | 3 | ||||
-rw-r--r-- | template.go | 8 |
4 files changed, 13 insertions, 7 deletions
@@ -17,9 +17,10 @@ type SuiteCfg struct { } type ReleaseCfg struct { - Release string `yaml:"Release"` - RepoURL string `yaml:"RepoURL"` - Suites []SuiteCfg `yaml:"Suites"` + Release string `yaml:"Release"` + RepoURL string `yaml:"RepoURL"` + ReleaseIndex string `yaml:"ReleaseIndex"` + Suites []SuiteCfg `yaml:"Suites"` } type PkgwebCfg struct { @@ -4,6 +4,7 @@ PkgSets: { Release: "ascii", RepoURL: "http://pkgmaster.devuan.org", + ReleaseIndex: "index_ascii.txt", Suites: [ { Name: "ascii", @@ -19,6 +20,7 @@ PkgSets: { Release: "experimental", RepoURL: "http://pkgmaster.devuan.org", + ReleaseIndex: "index_experimental.txt", Suites: [ { diff --git a/deb822/package.go b/deb822/package.go index 525f112..f7352a7 100644 --- a/deb822/package.go +++ b/deb822/package.go @@ -24,6 +24,7 @@ type Package struct { Component string Section string Priority string + Origin string } var regexpRemove = regexp.MustCompile("(DEVUAN/|DEBIAN/|[0-9]+:)") @@ -61,6 +62,8 @@ func NewPackage(s Stanza) (Package, error) { } p.Section = s["Section"] p.Priority = s["Priority"] + p.Origin = strings.Title(strings.ToLower(strings.Split(s["Filename"], "/")[1])) + fmt.Printf("p.Origin: %s\n", p.Origin) return p, nil } diff --git a/template.go b/template.go index 85a93f8..5e30f06 100644 --- a/template.go +++ b/template.go @@ -70,9 +70,9 @@ div.provides{ Search Devuan Packages for: <input type="text" name="search"/> in release <select name="release"> <option value="jessie" selected>Jessie 1.0.0</option> -<option value="ascii" >Ascii</option> -<option value="ceres" >Ceres (unstable) 1.0.0</option> -<option value="experimental" >Experimental 1.0.0</option> +<option value="ascii" >Ascii 2.0.0</option> +<option value="ceres" >Ceres (unstable)</option> +<option value="experimental" >Experimental</option> <option value="any" >Any</option> </select> <input type="submit" value="Go!"/> @@ -80,7 +80,7 @@ Search Devuan Packages for: <input type="text" name="search"/> in release </div> <div class="pkgname">{{.Name}} {{.Version}} [{{.Section}} - {{.Priority}}]</div> -<div class="pkg_suite">[{{.Suite}} - {{.Component}}]</div> +<div class="pkg_suite">[Origin: {{.Origin}} - {{.Suite}} - {{.Component}}]</div> <div class="description"> {{.Description}} </div> |