summaryrefslogtreecommitdiff
path: root/tableRepos.go
diff options
context:
space:
mode:
Diffstat (limited to 'tableRepos.go')
-rw-r--r--tableRepos.go23
1 files changed, 7 insertions, 16 deletions
diff --git a/tableRepos.go b/tableRepos.go
index 0b0b719..2e3fde2 100644
--- a/tableRepos.go
+++ b/tableRepos.go
@@ -4,8 +4,6 @@
package main
import (
- "fmt"
-
"go.wit.com/lib/protobuf/gitpb"
)
@@ -21,19 +19,6 @@ func isPackageOnMirrors(repo *gitpb.Repo) bool {
return false
}
-func debianFilename(repo *gitpb.Repo) string {
- manufactured := repo.GetCurrentVersion()
- ver := trimNonNumericFromStart(manufactured)
- name := me.forge.Config.DebName(repo.Namespace)
- if actualp := me.machine.FindByVersion(name, ver); actualp != nil {
- if actualp.PkgName == "" {
- return fmt.Sprintf("%v", actualp)
- }
- return actualp.PkgName
- }
- return "hmm"
-}
-
func printPackagingTable(pb *gitpb.Repos) {
tablePB := pb.NewTable("deb details")
tablePB.NewUuid()
@@ -103,7 +88,13 @@ func printPackagingTable(pb *gitpb.Repos) {
col.Width = 32
col = tablePB.AddStringFunc("deb name", func(r *gitpb.Repo) string {
- return debianFilename(r)
+ name := me.forge.Config.DebName(r.Namespace)
+ for pkg := range me.machine.Wit.IterAll() {
+ if name == pkg.Name {
+ return pkg.PkgName
+ }
+ }
+ return "missing " + name
})
col.Width = -1