diff options
| author | Jeff Carr <[email protected]> | 2025-10-21 06:56:20 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-21 06:56:20 -0500 |
| commit | d776ba4792acd16bd88aaba6ac2920ad1911b4d7 (patch) | |
| tree | ced525a22d9ce2cd758fd8c858e98b4a89309e62 | |
| parent | ad22a6b7cb41135aba0d87f5edcf4719c00558e3 (diff) | |
use ENVv0.0.18
| -rw-r--r-- | getKeyFromPackaagePB.go | 4 | ||||
| -rw-r--r-- | parseDpkgOutputIntoPB.go | 22 |
2 files changed, 13 insertions, 13 deletions
diff --git a/getKeyFromPackaagePB.go b/getKeyFromPackaagePB.go index e8dae4e..bf935df 100644 --- a/getKeyFromPackaagePB.go +++ b/getKeyFromPackaagePB.go @@ -3,8 +3,8 @@ package debian import ( "strings" + "go.wit.com/lib/ENV" "go.wit.com/lib/cobol" - "go.wit.com/lib/config" "go.wit.com/lib/protobuf/zoopb" "go.wit.com/log" ) @@ -24,7 +24,7 @@ func GetKeyFromPackagePB(p *zoopb.Package, varname string) (string, string) { return "Maintainer", p.DebInfo.Maintainer // return "Maintainer", p.Author case "Source": - if config.Verbose() { + if ENV.Verbose() { log.Info("skipping from controlfile", varname) // return "Source", p.DebInfo.Source } diff --git a/parseDpkgOutputIntoPB.go b/parseDpkgOutputIntoPB.go index 170a1c7..168fb22 100644 --- a/parseDpkgOutputIntoPB.go +++ b/parseDpkgOutputIntoPB.go @@ -10,8 +10,8 @@ import ( "os" "strings" + "go.wit.com/lib/ENV" "go.wit.com/lib/cobol" - "go.wit.com/lib/config" "go.wit.com/lib/gui/shell" "go.wit.com/lib/protobuf/zoopb" "go.wit.com/log" @@ -88,14 +88,14 @@ func ParseDpkgOutputIntoPB(pb *zoopb.Package, all string) { } if starting { if parts[0] == "new" { - if config.Verbose() { + if ENV.Verbose() { log.Printf("new: %v\n", parts) } // skip the first dpkg -I line continue } if parts[0] == "size" { - if config.Verbose() { + if ENV.Verbose() { log.Printf("size: %v\n", parts) } // todo: make this correct @@ -106,7 +106,7 @@ func ParseDpkgOutputIntoPB(pb *zoopb.Package, all string) { line = scanner.Text() parts = strings.Fields(line) if strings.HasPrefix(line, " ") { - if config.Verbose() { + if ENV.Verbose() { log.Printf("sizeline: %v\n", parts) } continue @@ -116,7 +116,7 @@ func ParseDpkgOutputIntoPB(pb *zoopb.Package, all string) { } } if starting { - if config.Verbose() { + if ENV.Verbose() { log.Printf("probably real data: %v\n", parts) } if strings.HasSuffix(parts[0], ":") { @@ -129,7 +129,7 @@ func ParseDpkgOutputIntoPB(pb *zoopb.Package, all string) { } varname := strings.TrimRight(parts[0], ":") varval := strings.Join(parts[1:], " ") - if config.Verbose() { + if ENV.Verbose() { log.Printf("varname:%s varval:%s\n", varname, varval) } switch varname { @@ -184,7 +184,7 @@ func ParseDpkgOutputIntoPB(pb *zoopb.Package, all string) { t, err := cobol.GetTime(varval) if t != nil { pb.GitDate = timestamppb.New(*t) - } else if config.Verbose() { + } else if ENV.Verbose() { log.Info("FIXME: Package-Build-Date", varval, err) } case "Deb-File-Date": @@ -192,7 +192,7 @@ func ParseDpkgOutputIntoPB(pb *zoopb.Package, all string) { t, err := cobol.GetTime(varval) if t != nil { pb.GitDate = timestamppb.New(*t) - } else if config.Verbose() { + } else if ENV.Verbose() { log.Info("FIXME: Package-Build-Date", varval, err) } case "Build-Date": @@ -200,18 +200,18 @@ func ParseDpkgOutputIntoPB(pb *zoopb.Package, all string) { t, err := cobol.GetTime(varval) if t != nil { pb.BuildDate = timestamppb.New(*t) - } else if config.Verbose() { + } else if ENV.Verbose() { log.Info("FIXME: Package-Build-Date", varval, err) } case "Package-Build-Date": t, err := cobol.GetTime(varval) if t != nil { pb.BuildDate = timestamppb.New(*t) - } else if config.Verbose() { + } else if ENV.Verbose() { log.Info("FIXME: Package-Build-Date", varval, err) } case "Git-Tag-Date": - if config.Verbose() { + if ENV.Verbose() { log.Info("FIXME: Git-Tag-Date", varval) } case "Description": |
