diff options
| author | Jeff Carr <[email protected]> | 2025-10-07 12:20:48 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-07 12:20:48 -0500 |
| commit | 525b609a1c88689f990d3fa30282c160dd475302 (patch) | |
| tree | 99dfb2cabb83a62664f0637e8225c479e7c830b7 | |
| parent | 557772a2409d436bc6ddab104a254b9bfb92e519 (diff) | |
.deb creationg is maybe working again
| -rw-r--r-- | argv.go | 2 | ||||
| -rw-r--r-- | tablePackaging.go | 38 |
2 files changed, 31 insertions, 9 deletions
@@ -51,7 +51,7 @@ type DebianCmd struct { DryRun bool `arg:"--dry-run" help:"only show what would be packaged"` Verbose bool `arg:"--verbose" help:"be loud about it"` Force bool `arg:"--force" help:"rebuild everything"` - Quick bool `arg:"--quick" help:"only build repos with new versions"` + All bool `arg:"--all" help:"build everything again"` } type CloneCmd struct { diff --git a/tablePackaging.go b/tablePackaging.go index 7c1c897..02922e2 100644 --- a/tablePackaging.go +++ b/tablePackaging.go @@ -4,6 +4,7 @@ package main import ( + "go.wit.com/lib/debian" "go.wit.com/lib/protobuf/gitpb" "go.wit.com/lib/protobuf/zoopb" "go.wit.com/log" @@ -27,6 +28,16 @@ func isPackageOnMirrors(repo *gitpb.Repo) bool { return true } +func getDebFilename(repo *gitpb.Repo) string { + name := me.forge.Config.DebName(repo.Namespace) + for pkg := range me.machine.Wit.IterAll() { + if name == pkg.Name { + return pkg.PkgName + } + } + return "" +} + func printPackagingTable(pb *gitpb.Repos) { tablePB := pb.NewTable("deb details") tablePB.NewUuid() @@ -73,7 +84,12 @@ func printPackagingTable(pb *gitpb.Repos) { col.Width = 1 col = tablePB.AddStringFunc("done", func(r *gitpb.Repo) string { - if isPackageOnMirrors(r) { + if r.IsDirty() { + return "yes" + } + ver := r.GetCurrentVersion() + debname := getDebFilename(r) + if debian.DebFilenameMatchesVersion(debname, ver) { return "yes" } return "" @@ -81,7 +97,15 @@ func printPackagingTable(pb *gitpb.Repos) { col.Width = 4 col = tablePB.AddStringFunc("build", func(r *gitpb.Repo) string { - if isPackageOnMirrors(r) { + if r.IsDirty() { + return "no" + } + ver := r.GetCurrentVersion() + debname := getDebFilename(r) + if !debian.DebFilenameMatchesVersion(debname, ver) { + return "yes" + } + if argv.All { return "yes" } return "" @@ -92,13 +116,11 @@ func printPackagingTable(pb *gitpb.Repos) { col.Width = 32 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 { - return pkg.PkgName - } + debname := getDebFilename(r) + if debname == "" { + return "missing " + debname } - return "missing " + name + return debname }) col.Width = -1 |
