diff options
| author | Jeff Carr <[email protected]> | 2025-10-07 07:32:31 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-07 07:32:31 -0500 |
| commit | cb63f983305808beb2c108b4bad25c2cbc8ca926 (patch) | |
| tree | b6c34c75c58a0f071810724a5022cbdfd71375d5 /tableRepos.go | |
| parent | bb894f7f9404704f8098758319fb88f030f17d90 (diff) | |
fixed package name searching
Diffstat (limited to 'tableRepos.go')
| -rw-r--r-- | tableRepos.go | 23 |
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 |
