diff options
| author | Jeff Carr <[email protected]> | 2025-10-07 08:00:05 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-07 08:00:05 -0500 |
| commit | 85761945ce11bd2417b1889b210f3d582f1ec211 (patch) | |
| tree | df7f3451f7a6d65a6f1ad9119e2a5c8e47b07f59 /tableRepos.go | |
| parent | cb63f983305808beb2c108b4bad25c2cbc8ca926 (diff) | |
early work on a debian library
Diffstat (limited to 'tableRepos.go')
| -rw-r--r-- | tableRepos.go | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/tableRepos.go b/tableRepos.go index 2e3fde2..c15dbd6 100644 --- a/tableRepos.go +++ b/tableRepos.go @@ -5,18 +5,22 @@ package main import ( "go.wit.com/lib/protobuf/gitpb" + "go.wit.com/lib/protobuf/zoopb" + "go.wit.com/log" ) func isPackageOnMirrors(repo *gitpb.Repo) bool { - manufactured := repo.GetCurrentVersion() - ver := trimNonNumericFromStart(manufactured) + var found *zoopb.Package name := me.forge.Config.DebName(repo.Namespace) - if actualp := me.machine.FindByVersion(name, ver); actualp != nil { - // end += " (version match) " + actualp.Version + " " + ver + " " - // repo.State = "on mirrors" - return true + for pkg := range me.machine.Wit.IterAll() { + if name == pkg.Name { + found = pkg + } + } + if found.PkgName == "" { + log.Info("found", found) } - return false + return true } func printPackagingTable(pb *gitpb.Repos) { @@ -56,14 +60,10 @@ func printPackagingTable(pb *gitpb.Repos) { */ col = tablePB.AddStringFunc("I", func(r *gitpb.Repo) string { - name := me.forge.Config.DebName(r.GetNamespace()) - if me.machine.IsInstalled(name) { + debname := me.forge.Config.DebName(r.GetNamespace()) + if me.machine.IsInstalled(debname) { return "X" } - // debname := me.forge.Config.DebName(r.GetNamespace()) - // if actualp := me.machine.FindInstalledByName(debname); actualp != nil { - // return "X" - // } return "" }) col.Width = 1 @@ -87,7 +87,7 @@ func printPackagingTable(pb *gitpb.Repos) { col = tablePB.AddState() col.Width = 32 - col = tablePB.AddStringFunc("deb name", func(r *gitpb.Repo) string { + col = tablePB.AddStringFunc("filename for .deb", func(r *gitpb.Repo) string { name := me.forge.Config.DebName(r.Namespace) for pkg := range me.machine.Wit.IterAll() { if name == pkg.Name { |
