FS#79455 - [pacman] Doesn't honor repository priority while upgrading

Attached to Project: Arch Linux
Opened by Alberto Salvia Novella (es20490446e) - Wednesday, 23 August 2023, 16:46 GMT
Last edited by Toolybird (Toolybird) - Wednesday, 23 August 2023, 22:57 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

When pacman syncs a package that is present in multiple repositories, it always does from the repo listed first, no matter if the package version is older in that repo.

But it doesn't happen the same while upgrading.

If you have the package already installed in your system, with the same or lower version than the first repo, pacman won't upgrade to the repo package.

This inconsistency can be problematic in a bunch of situation. For example if the repo has arranged the dependencies in certain way, or if the repo expected to link against certain soname.

I would argue that if the package in the repo has at least the same version than the one in the system, but it was installed from a different origin, it shall upgrade if the `--needed` option isn't present.

Otherwise the first behavior of syncing from the first repo package is effectively broken, and any personal repo rearranging deps or sonames must use `epoch` to force upgrade.
This task depends upon

Closed by  Toolybird (Toolybird)
Wednesday, 23 August 2023, 22:57 GMT
Reason for closing:  Not a bug
Additional comments about closing:  See comments
Comment by Doug Newgard (Scimmia) - Wednesday, 23 August 2023, 17:18 GMT
If it's the same version, that's correct and expected behavior. A package is a package to pacman, it doesn't matter where it came from, and pacman doesn't even record that info.

If the version in the repo is newer, it will upgrade. I don't see how it couldn't. Are you sure your installed version didn't have an epoch or something?
Comment by Toolybird (Toolybird) - Wednesday, 23 August 2023, 22:56 GMT
> If you have the package already installed in your system, with the same or lower version than the first repo, pacman won't upgrade to the repo package.

Yes, that is the correct and documented behavior [1]. Note where it says "regardless of version number"

> If the version in the repo is newer, it will upgrade

No, that's not quite right. See above.

Either way, pacman issues don't belong here. If you want to discuss it further, pacman development happens in the Arch GitLab instance [2]

[1] https://man.archlinux.org/man/pacman.conf.5.en#REPOSITORY_SECTIONS
[2] https://gitlab.archlinux.org/pacman/pacman

Loading...