Skip to content

Commit 61647aa

Browse files
rschoonsilverwind
authored andcommitted
Fix debian InRelease Acquire-By-Hash newline (go-gitea#29204)
There is a missing newline when generating the debian apt repo InRelease file, which results in output like: ``` [...] Date: Wed, 14 Feb 2024 05:03:01 UTC Acquire-By-Hash: yesMD5Sum: 51a518dbddcd569ac3e0cebf330c800a 3018 main-dev/binary-amd64/Packages [...] ``` It appears this would probably result in apt ignoring the Acquire-By-Hash setting and not using the by-hash functionality, although I'm not sure how to confirm it.
1 parent a922cf7 commit 61647aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/packages/debian/repository.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ func buildReleaseFiles(ctx context.Context, ownerID int64, repoVersion *packages
342342
fmt.Fprintf(w, "Components: %s\n", strings.Join(components, " "))
343343
fmt.Fprintf(w, "Architectures: %s\n", strings.Join(architectures, " "))
344344
fmt.Fprintf(w, "Date: %s\n", time.Now().UTC().Format(time.RFC1123))
345-
fmt.Fprint(w, "Acquire-By-Hash: yes")
345+
fmt.Fprint(w, "Acquire-By-Hash: yes\n")
346346

347347
pfds, err := packages_model.GetPackageFileDescriptors(ctx, pfs)
348348
if err != nil {

0 commit comments

Comments
 (0)