diff options
| author | Jeff Carr <[email protected]> | 2025-10-15 07:35:52 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-15 07:35:52 -0500 |
| commit | 769ab0c88b51a10124b7328b937fa35dad1c7cb4 (patch) | |
| tree | f525e26f5505491f311053a3ace17b18670c8088 /build.go | |
| parent | c14e4ab5b155d23b0e7bb9d4ae0e18769cc3418a (diff) | |
dump more of the old junk
Diffstat (limited to 'build.go')
| -rw-r--r-- | build.go | 22 |
1 files changed, 13 insertions, 9 deletions
@@ -5,6 +5,7 @@ import ( "fmt" "os" "path/filepath" + "strings" "time" "go.wit.com/lib/debian" @@ -188,15 +189,6 @@ func buildPackage(repo *gitpb.Repo) (bool, error) { } } - controlfile := debian.MakeControlFile(me.pb) - controlfile += "\n" - log.Info(controlfile) - if err := os.WriteFile("files/DEBIAN/control", []byte(controlfile), 0644); err != nil { - me.sh.BadExit("write err files/DEBIAN/control", err) - } - // if !writeDebianControlFile(repo) { - // return false, errors.New("write control file") - // } if shell.Exists("postinst") { repo.RunVerbose([]string{"cp", "postinst", "files/DEBIAN/"}) } @@ -211,6 +203,18 @@ func buildPackage(repo *gitpb.Repo) (bool, error) { log.Info(repo.FullPath, "NOT FOUND ./build HERE") } + r := repo.Run([]string{"du", "-s"}) + if len(r.Stdout) != 1 { + me.sh.BadExit("du -s files/ failed", r.Error) + } + me.pb.DebInfo.InstalledSize = strings.Fields(r.Stdout[0])[0] + controlfile := debian.MakeControlFile(me.pb) + controlfile += "\n" + log.Info(controlfile) + if err := os.WriteFile("files/DEBIAN/control", []byte(controlfile), 0644); err != nil { + me.sh.BadExit("write err files/DEBIAN/control", err) + } + cmd := []string{"dpkg-deb", "--root-owner-group", "--build", "files", fulldebname} result := repo.RunVerbose(cmd) if shell.Exists(fulldebname) { |
