Skip to content

Arch package registry: client error when two versions of a package are present #33534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
balki opened this issue Feb 8, 2025 · 5 comments · Fixed by #33262
Closed

Arch package registry: client error when two versions of a package are present #33534

balki opened this issue Feb 8, 2025 · 5 comments · Fixed by #33262

Comments

@balki
Copy link
Contributor

balki commented Feb 8, 2025

Description

When a new version of a package is added, the database includes both old and new versions. This confuses pacman client.

error: <repo> database is inconsistent: version mismatch on package <package name>

The default core and extra repos include only the latest version of each package.

Gitea Version

1.23.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

archlinux

Database

PostgreSQL

@balki balki added the type/bug label Feb 8, 2025
@balki
Copy link
Contributor Author

balki commented Feb 8, 2025

@KN4CK3R Please take a look.

@wxiaoguang
Copy link
Contributor

Only show the latest version in the Arch index #33262 ?

@ExplodingDragon
Copy link
Contributor

Seems like this is an upstream issue with pacman. If there are two different versions of a package in the database, it might trigger this problem. I guess?

Image

@wxiaoguang
Copy link
Contributor

Seems like this is an upstream issue with pacman. If there are two different versions of a package in the database, it might trigger this problem. I guess?

Or maybe pacman is just designed that way: it expects the package database should only have one version?

@balki
Copy link
Contributor Author

balki commented Feb 9, 2025

Seems like this is an upstream issue with pacman.

I think it is by design. In each db, only one version of the packages is supposed to be present. libalpm is the official library to work with databases. The function signature below to get a package does not have version parameter. https://man.archlinux.org/man/libalpm_databases.3.en

alpm_pkg_t * alpm_db_get_pkg (alpm_db_t * db, const char * name)

Different versions can be in different databases. E.g. testing can have newest version and core can have current version. But within one database, only one version is expected.

when there is a need to have both older and newer version at the same time, the package name is changed. E.g. postgresql and postgresql-old-upgrade

wxiaoguang added a commit that referenced this issue Feb 13, 2025
Only show the latest version of the package in the arch repo.

closes #33534

---------

Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
GiteaBot added a commit to GiteaBot/gitea that referenced this issue Feb 13, 2025
Only show the latest version of the package in the arch repo.

closes go-gitea#33534

---------

Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
wxiaoguang added a commit that referenced this issue Feb 13, 2025
Backport #33262 by ExplodingDragon

Only show the latest version of the package in the arch repo.

closes #33534

Co-authored-by: Exploding Dragon <explodingfkl@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants