Debian registry: Reading package lists... Error! #11401

Closed
opened 2025-11-02 09:36:41 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @podsvirov on GitHub (Aug 3, 2023).

Description

I was create Debian packages as described there, and then upload it to registry at Gitea demo site there. I also reproduse this error at my Gitea instanse version 1.20.2.

But when I try to setup this registry from the command line, I get the error:

Reading package lists... Error!
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/try.gitea.io_api_packages_podsvirov_debian_dists_ubuntu_jammy_binary-amd64_Packages.lz4
E: The package lists or status file could not be parsed or opened.

Looks like Gite generate extra empty line inside Package file inside Package description block.

I guess the source of the error in the code is here.

Gitea Version

1.20.2

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

The docker container from image gitea/gitea:1.20.2 on Ubuntu host via docker-compose.

Database

SQLite

Originally created by @podsvirov on GitHub (Aug 3, 2023). ### Description I was create Debian packages as described [there](https://github.com/sewenew/redis-plus-plus#building-a-redis-plus-plus-debian-package-optional), and then upload it to registry at Gitea demo site [there](https://try.gitea.io/podsvirov/-/packages/debian/libredis++-dev/1.3.10). I also reproduse this error at my Gitea instanse version `1.20.2`. But when I try to setup this registry from the command line, I get the error: ```shell Reading package lists... Error! E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/try.gitea.io_api_packages_podsvirov_debian_dists_ubuntu_jammy_binary-amd64_Packages.lz4 E: The package lists or status file could not be parsed or opened. ``` Looks like Gite generate extra empty line inside `Package` file inside `Package` description block. I guess the source of the error in the code is [here](https://github.com/go-gitea/gitea/blob/d74c2228e3f93de502aa37095a00421ca67c4ca9/services/packages/debian/repository.go#L215). ### Gitea Version 1.20.2 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? The docker container from image gitea/gitea:1.20.2 on Ubuntu host via docker-compose. ### Database SQLite
GiteaMirror added the topic/packagestype/bug labels 2025-11-02 09:36:41 -06:00
Author
Owner

@KN4CK3R commented on GitHub (Aug 4, 2023):

Thank you for the report. That's the first debian package I got which has a double newline character at the end of the control block. I will send a fix soon.

@KN4CK3R commented on GitHub (Aug 4, 2023): Thank you for the report. That's the first debian package I got which has a double newline character at the end of the control block. I will send a fix soon.
Author
Owner

@podsvirov commented on GitHub (Aug 5, 2023):

Thanks for quick fix! 🥳

@podsvirov commented on GitHub (Aug 5, 2023): Thanks for quick fix! 🥳
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11401