summaryrefslogtreecommitdiff
path: root/deb822
diff options
context:
space:
mode:
Diffstat (limited to 'deb822')
-rw-r--r--deb822/package.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/deb822/package.go b/deb822/package.go
index 3c1c172..9d3b1a1 100644
--- a/deb822/package.go
+++ b/deb822/package.go
@@ -19,6 +19,10 @@ type Package struct {
Recommends []string
Maintainer string
Filename string
+ Suite string
+ Component string
+ Section string
+ Priority string
}
var regexpRemove = regexp.MustCompile("(DEVUAN/|DEBIAN/|[0-9]+:)")
@@ -49,6 +53,8 @@ func NewPackage(s Stanza) (Package, error) {
if len(p.Recommends) == 0 {
p.Recommends = nil
}
+ p.Section = s["Section"]
+ p.Priority = s["Priority"]
return p, nil
}
@@ -67,13 +73,15 @@ func PrintPackage(p Package, templ string, out io.Writer) {
/*Stanza2HtmlPage Render the html webpage of a package and save it in the
/* corresponding "pool" directory.
*/
-func Stanza2HtmlPage(s Stanza, templ string, baseDir string) error {
+func Stanza2HtmlPage(s Stanza, templ string, baseDir string, suite string, component string) error {
fname := s["Filename"]
if fname == "" {
return fmt.Errorf("No Filename provided")
}
p, err := NewPackage(s)
+ p.Suite = suite
+ p.Component = component
if err != nil {
log.Fatal("empty package!!!")
}