Skip to content

conan package registry and header only packages #27090

Closed
@lukester1975

Description

@lukester1975

Description

Header only conan packages can generate an empty conaninfo.txt, due to

def package_id(self):
    self.info.clear()

gitea is currently ignoring such files, which appears to be due to

if buf.Size() == 0 {
// ignore empty uploads, second request contains content
jsonResponse(ctx, http.StatusOK, nil)
return
}
which breaks the conan client when trying to consume such packages:

tuplet/2.1.1: ERROR: Exception while getting package: da39a3ee5e6b4b0d3255bfef95601890afd80709
tuplet/2.1.1: ERROR: Exception: <class 'conans.errors.ConanException'> Corrupted tuplet/2.1.1:da39a3ee5e6b4b0d3255bfef95601890afd80709 in 'external' remote: no conaninfo.txt
ERROR: Corrupted tuplet/2.1.1:da39a3ee5e6b4b0d3255bfef95601890afd80709 in 'external' remote: no conaninfo.txt

Removing the above block in conan.go allows the empty conaninfo.txt to be stored in the registry, and the conan client works successfully.

Whether there are any other side effects of removing the check I couldn't say... seems OK so far though.

Thanks

Gitea Version

1.20.4

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

N/a

Operating System

Linux

How are you running Gitea?

N/a but Fedora 38, systemd, custom build.

Database

MySQL/MariaDB

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions