summaryrefslogtreecommitdiff
path: root/deb822/package.go
diff options
context:
space:
mode:
Diffstat (limited to 'deb822/package.go')
-rw-r--r--deb822/package.go3
1 files changed, 3 insertions, 0 deletions
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
}