[opensuse-buildservice] Dependency resolution for rpm packages with same name
Hello, Is it possible to have two packages with same name and different versions in single rpm repository of OBS project? Currently I have: - package pkg-old with subpackage libdep-1-1.1.rpm providing libdep.so.1 - package pkg-new with subpackage libdep-2-1.1.rpm providing libdep.so.2 Non-suffixed libdep.so is not provided at all. When I try to use libdep for different apps, applications using libdep.so.1 are fine, but for ones requiring libdep.so.2 OBS reports 'nothing provides libdep.so.2', though I can see this tag in 'Provides' list for package in web-interface. Moreover that: when I try to add synthetic rpm tag using 'Provides:', this tag is generated successfully, but does not help to resolve the situation. As far as I understand, the repository is sorted in alphanumeric order and only first libdep-1-1.1.rpm is processed when dependency tree is constructed. The RPM itself is capable of distinguishing these packages, so it's just OBS internal thing. Is this a bug or planned behavior? Thank you, Slava Barinov. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Wednesday 2020-07-15 14:58, Vyacheslav Barinov wrote:
Is it possible to have two packages with same name and different versions in single rpm repository of OBS project?
Currently I have: - package pkg-old with subpackage libdep-1-1.1.rpm providing libdep.so.1 - package pkg-new with subpackage libdep-2-1.1.rpm providing libdep.so.2
As per our guidelines, the package name ought to be libdep1, the filename thus libdep1-1-1.1.rpm, and libdep2, libdep2-1-1.1.rpm. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Wed, Jul 15, 2020 at 9:55 AM Jan Engelhardt <jengelh@inai.de> wrote:
On Wednesday 2020-07-15 14:58, Vyacheslav Barinov wrote:
Is it possible to have two packages with same name and different versions in single rpm repository of OBS project?
Currently I have: - package pkg-old with subpackage libdep-1-1.1.rpm providing libdep.so.1 - package pkg-new with subpackage libdep-2-1.1.rpm providing libdep.so.2
As per our guidelines, the package name ought to be libdep1, the filename thus libdep1-1-1.1.rpm, and libdep2, libdep2-1-1.1.rpm.
That is not the answer to the question he's asking. And there's no reason to assume this is openSUSE. The correct answer here is that yes, OBS does not handle this properly. It locates packages by name and shadows the rest based on that. You can work around this by adding versioned dependency clauses to your spec file, though. -- 真実はいつも一つ!/ Always, there's only one truth! -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Wednesday 2020-07-15 16:00, Neal Gompa wrote:
On Wednesday 2020-07-15 14:58, Vyacheslav Barinov wrote:
Is it possible to have two packages with same name and different versions in single rpm repository of OBS project?
Currently I have: - package pkg-old with subpackage libdep-1-1.1.rpm providing libdep.so.1 - package pkg-new with subpackage libdep-2-1.1.rpm providing libdep.so.2
As per our guidelines, the package name ought to be libdep1, the filename thus libdep1-1-1.1.rpm, and libdep2, libdep2-1-1.1.rpm.
That is not the answer to the question he's asking. And there's no reason to assume this is openSUSE.
The correct answer here is that yes, OBS does not handle this properly. It locates packages by name and shadows the rest based on that.
1. Considering multiple projects: In systems with inheritance, shadowing is an essential feature when there is a hierarchy, otherwise you could not (easily) override the parent's contents. (Similar behavior can be found in C++ class inheritance for example) 2. Considering single project: OBS locates packages by name, and then picks the most recent one of those, which is a necessity if you have a binary static import that you need to work off (e.g. bootstrap). Therefore, I will argue OBS handles it within the premise set for itself. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Mittwoch, 15. Juli 2020, 16:37:45 CEST wrote Jan Engelhardt:
On Wednesday 2020-07-15 16:00, Neal Gompa wrote:
On Wednesday 2020-07-15 14:58, Vyacheslav Barinov wrote:
Is it possible to have two packages with same name and different versions in single rpm repository of OBS project?
Currently I have: - package pkg-old with subpackage libdep-1-1.1.rpm providing libdep.so.1 - package pkg-new with subpackage libdep-2-1.1.rpm providing libdep.so.2
As per our guidelines, the package name ought to be libdep1, the filename thus libdep1-1-1.1.rpm, and libdep2, libdep2-1-1.1.rpm.
That is not the answer to the question he's asking. And there's no reason to assume this is openSUSE.
The correct answer here is that yes, OBS does not handle this properly. It locates packages by name and shadows the rest based on that.
well, indeed, but you would have quite similar problems in installed systems. You need to craft your package in a very special way that you can install multiple versions of the same package name ...
1. Considering multiple projects: In systems with inheritance, shadowing is an essential feature when there is a hierarchy, otherwise you could not (easily) override the parent's contents. (Similar behavior can be found in C++ class inheritance for example)
2. Considering single project: OBS locates packages by name, and then picks the most recent one of those, which is a necessity if you have a binary static import that you need to work off (e.g. bootstrap).
Therefore, I will argue OBS handles it within the premise set for itself.
-- Adrian Schroeter email: adrian@suse.de SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Neal Gompa <ngompa13@gmail.com> writes:
On Wed, Jul 15, 2020 at 9:55 AM Jan Engelhardt <jengelh@inai.de> wrote:
On Wednesday 2020-07-15 14:58, Vyacheslav Barinov wrote:
Is it possible to have two packages with same name and different versions in single rpm repository of OBS project?
Currently I have: - package pkg-old with subpackage libdep-1-1.1.rpm providing libdep.so.1 - package pkg-new with subpackage libdep-2-1.1.rpm providing libdep.so.2
As per our guidelines, the package name ought to be libdep1, the filename thus libdep1-1-1.1.rpm, and libdep2, libdep2-1-1.1.rpm.
That is not the answer to the question he's asking. And there's no reason to assume this is openSUSE.
Yes, you're right, I work in our local OBS appliance.
The correct answer here is that yes, OBS does not handle this properly. It locates packages by name and shadows the rest based on that. You can work around this by adding versioned dependency clauses to your spec file, though.
Okay, I see. Then the only way left is changing all the dependent packages to make them use right package. Thank you. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (4)
-
Adrian Schröter
-
Jan Engelhardt
-
Neal Gompa
-
Vyacheslav Barinov