summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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