diff options
author | KatolaZ <katolaz@freaknet.org> | 2018-01-11 00:06:52 +0000 |
---|---|---|
committer | KatolaZ <katolaz@freaknet.org> | 2018-01-11 00:06:52 +0000 |
commit | 74218fbc7aabf1efe3cacc801bb55e6ae87eaa08 (patch) | |
tree | 2a11a66d8214bac1e769600786169673637598fb /deb822 | |
parent | 567a64aa25a1823f6188c8e17edfca4caf6499b0 (diff) |
Added "Provides:"
Diffstat (limited to 'deb822')
-rw-r--r-- | deb822/package.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/deb822/package.go b/deb822/package.go index 9d3b1a1..9eae85c 100644 --- a/deb822/package.go +++ b/deb822/package.go @@ -15,6 +15,7 @@ type Package struct { Version string Description string LongDescription string + Provides []string Depends []string Recommends []string Maintainer string @@ -45,6 +46,11 @@ func NewPackage(s Stanza) (Package, error) { p.LongDescription = regexpDots.ReplaceAllString(descr[1], "") } p.Maintainer = s["Maintainer"] + p.Provides = strings.Split(s["Provides"], ",") + if len(p.Provides) == 0 { + p.Provides = nil + } + p.Depends = strings.Split(s["Depends"], ",") if len(p.Depends) == 0 { p.Depends = nil |