summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatolaZ <katolaz@freaknet.org>2018-01-11 00:06:52 +0000
committerKatolaZ <katolaz@freaknet.org>2018-01-11 00:06:52 +0000
commit74218fbc7aabf1efe3cacc801bb55e6ae87eaa08 (patch)
tree2a11a66d8214bac1e769600786169673637598fb
parent567a64aa25a1823f6188c8e17edfca4caf6499b0 (diff)
Added "Provides:"
-rw-r--r--d1pkgweb.go9
-rw-r--r--deb822/package.go6
2 files changed, 15 insertions, 0 deletions
diff --git a/d1pkgweb.go b/d1pkgweb.go
index d9f236f..6aba272 100644
--- a/d1pkgweb.go
+++ b/d1pkgweb.go
@@ -64,6 +64,10 @@ li.rec_item{
margin-left: 35px;
}
+div.provides{
+ margin-bottom: 35px;
+ margin-left: 20px;
+}
</style>
@@ -77,6 +81,11 @@ li.rec_item{
</div>
<hr>
+
+<div class="provides">
+{{range .Provides}}<div class="prov_item">Provides: {{.}}</div>{{end}}
+</div>
+
<div class="dep_list">
Depends:
<ul>
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