Codebase list dh-make-golang / 5547405
Make sure to call normalizeDebianProgramName() on the whole name, not on parts According to policy, the minimum length for a package is two, which is something normalizeDebianProgramName() checks. However this function was called on *parts* of the package name, and in case of a package such as golang-golang-x-term, it fails, as the part "x" is only one character. Note that we can safely drop strings.Trim(), as the string returned by normalizeDebianProgramName() was already trimmed from '-' Closes: #148 Arnaud Rebillout authored 3 years ago zhsj committed 3 years ago
1 changed file(s) with 1 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
597597 }
598598 parts[0] = host
599599
600 for i := range parts {
601 if i == 0 {
602 continue
603 }
604
605 parts[i] = normalizeDebianProgramName(parts[i])
606 }
607
608 return strings.Trim("golang-"+strings.Join(parts, "-"), "-")
600 return normalizeDebianProgramName("golang-" + strings.Join(parts, "-"))
609601 }
610602
611603 func getDebianName() string {