diff options
| author | Jeff Carr <[email protected]> | 2025-10-04 02:34:49 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-04 02:34:49 -0500 |
| commit | c2c776c4f307c5c3c170c45ca06fc10f5ee58ee8 (patch) | |
| tree | 3a71322a8bd501d52c23caeb3ae54784aa8cf0e5 /tableRepos.go | |
| parent | f50d2bcb19f2165723dcd5e5e20368561a2febc9 (diff) | |
partail builds work againv0.1.5
Diffstat (limited to 'tableRepos.go')
| -rw-r--r-- | tableRepos.go | 73 |
1 files changed, 1 insertions, 72 deletions
diff --git a/tableRepos.go b/tableRepos.go index 7cdf76e..f478287 100644 --- a/tableRepos.go +++ b/tableRepos.go @@ -4,13 +4,7 @@ package main import ( - "fmt" - "os" - "path/filepath" - "strings" - "go.wit.com/lib/protobuf/gitpb" - "go.wit.com/log" ) func isPackageOnMirrors(repo *gitpb.Repo) bool { @@ -81,7 +75,7 @@ func printRepos(pb *gitpb.Repos) { col.Width = 4 col = tablePB.AddStringFunc("build", func(r *gitpb.Repo) string { - if willBuild(r) { + if shouldBuild(r) { return "yes" } return "" @@ -106,68 +100,3 @@ func printRepos(pb *gitpb.Repos) { tablePB.PrintTable() } - -func getStatusEnd(repo *gitpb.Repo) string { - var end string - - manufactured := repo.GetCurrentVersion() - ver := trimNonNumericFromStart(manufactured) - name := me.forge.Config.DebName(repo.GetGoPath()) - var realver string - if installedPackage := me.machine.FindInstalledByName(name); installedPackage != nil { - realver = installedPackage.Version - } - if actualp := me.machine.FindByVersion(name, ver); actualp != nil { - // end += " (version match) " + actualp.Version + " " + ver + " " - // repo.State = "on mirrors" - } else { - if realver != "" { - end += fmt.Sprintf(" (version miss) %s vs %s ", realver, ver) - } - // end += "" + ver + " " - } - - debname := name + "_" + ver + "_amd64.deb" - // debnames[repo] = debname - outdir := getOutdir(repo) - _, err := os.Stat(filepath.Join(outdir, debname)) - if err == nil { - // log.Info("exists", filepath.Join(outdir, debname)) - repo.State = "in incoming" - } else { - // log.Info(debname, "does not exist") - } - if strings.HasPrefix(repo.GetState(), "unknown bran") { - end += " (will build) " - } - - if repo.State == "" { - end += " (will build) " - } - - if repo.State == "need to build" { - end += " (will build) " - } - - if name == "" { - // err := fmt.Sprintf("name is blank error %+v", repo) - log.Warn("name is blank error", repo.GetGoPath()) - } - return end -} - -func willBuild(repo *gitpb.Repo) bool { - if strings.HasPrefix(repo.GetState(), "unknown bran") { - return true - } - - if repo.State == "" { - return true - } - - if repo.State == "need to build" { - return true - } - - return false -} |
