summaryrefslogtreecommitdiff
path: root/getKeyFromPackaagePB.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-15 05:34:44 -0500
committerJeff Carr <[email protected]>2025-10-15 05:34:44 -0500
commit291f68c2e5e8b7d10ea62c92b1b67c31d5207ca2 (patch)
treec68f838776411c7b602c44d36b29ff9c44bc29fb /getKeyFromPackaagePB.go
parent4edcd924f3ba12bdcf952c563657d7d4cc8b8165 (diff)
fix Description
Diffstat (limited to 'getKeyFromPackaagePB.go')
-rw-r--r--getKeyFromPackaagePB.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/getKeyFromPackaagePB.go b/getKeyFromPackaagePB.go
index 3fa947c..79c42fe 100644
--- a/getKeyFromPackaagePB.go
+++ b/getKeyFromPackaagePB.go
@@ -55,6 +55,8 @@ func GetKeyFromPackagePB(p *zoopb.Package, varname string) (string, string) {
return "Pre-Depends", p.DebInfo.PreDepends
case "Suggests":
return "Suggests", p.DebInfo.Suggests
+ case "Recommends":
+ return "Recommends", p.DebInfo.Recommends
case "MultiArch":
return "Multi-Arch", p.DebInfo.MultiArch
case "Tag":
@@ -73,6 +75,9 @@ func GetKeyFromPackagePB(p *zoopb.Package, varname string) (string, string) {
}
return "Build-Date", cobol.Time(p.BuildDate)
case "DebCtime":
+ if p.Ctime == nil {
+ return "Deb-File-Date", ""
+ }
return "Deb-File-Date", cobol.Time(p.Ctime)
case "SHA1":
return "SHA1", "" // deprecated
@@ -84,17 +89,18 @@ func GetKeyFromPackagePB(p *zoopb.Package, varname string) (string, string) {
case "SHA512":
return "SHA512", "" // totally rediculously overkill
case "Description":
+ // log.Info("DESC:", p.DebInfo.Description)
var out string
lines := strings.Split(p.DebInfo.Description, "\n")
if len(lines) == 0 {
- return "Description", out
+ return "Description", ""
}
- out = "Description: " + strings.TrimSpace(lines[0])
+ out = strings.TrimSpace(lines[0]) + "\n"
if len(lines) == 1 {
return "Description", out
}
for _, line := range lines[1:] {
- out += " " + strings.TrimSpace(line)
+ out += " " + strings.TrimSpace(line) + "\n"
}
return "Description", out
default: