Skip to content

Commit 6f4e800

Browse files
committed
Move Build-Depends-{Arch,Indep} back into Build-Depends
For Go packages, golang-any and dependencies are always needed regardless of whether we are building a program or a library, and it is not like we need e.g. texinfo to build *-doc packages, so the use Build-Depends-Arch and Build-Depends-Indep served no purpose other than unnecessarily complicating things. This reverts commit 5bfe8a6
1 parent aed5fc3 commit 6f4e800

File tree

1 file changed

+7
-17
lines changed

1 file changed

+7
-17
lines changed

template.go

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -139,23 +139,13 @@ func writeDebianControl(dir, gopkg, debsrc, debLib, debProg string, pkgType pack
139139
fmt.Fprintf(f, "Testsuite: autopkgtest-pkg-go\n")
140140
fmt.Fprintf(f, "Priority: optional\n")
141141

142-
builddeps := []string{"debhelper-compat (= 12)", "dh-golang"}
143-
builddepsByType := append([]string{"golang-any"}, dependencies...)
144-
sort.Strings(builddepsByType)
145-
switch pkgType {
146-
case typeLibrary, typeProgram:
147-
fprintfControlField(f, "Build-Depends", builddeps)
148-
builddepsDepType := "Indep"
149-
if pkgType == typeProgram {
150-
builddepsDepType = "Arch"
151-
}
152-
fprintfControlField(f, "Build-Depends-"+builddepsDepType, builddepsByType)
153-
case typeLibraryProgram, typeProgramLibrary:
154-
builddeps = append(builddeps, builddepsByType...)
155-
fprintfControlField(f, "Build-Depends", builddeps)
156-
default:
157-
log.Fatalf("Invalid pkgType %d in writeDebianControl(), aborting", pkgType)
158-
}
142+
builddeps := append([]string{
143+
"debhelper-compat (= 12)",
144+
"dh-golang",
145+
"golang-any"},
146+
dependencies...)
147+
sort.Strings(builddeps)
148+
fprintfControlField(f, "Build-Depends", builddeps)
159149

160150
fmt.Fprintf(f, "Standards-Version: 4.5.0\n")
161151
fmt.Fprintf(f, "Vcs-Browser: https://salsa.debian.org/go-team/packages/%s\n", debsrc)

0 commit comments

Comments
 (0)