W dniu 27.02.2024 o 13:03, Neal Gompa pisze:
On Tue, Feb 27, 2024 at 6:36 AM Andrei Borzenkov <arvidjaar@gmail.com> wrote:
On Tue, Feb 27, 2024 at 2:16 PM Adam Mizerski <adam@mizerski.pl> wrote:
Hi,
I wanted to push sequoia-octopus-librnp to Factory. It's a replacement for Thunderbird's default openpgp implementation. It works by being a drop-in replacement for a shared library librnp.so.
What I want to achieve: - MozillaThunderbird-openpgp-librnp and sequoia-octopus-librnp are mutually exclusive - MozillaThunderbird-openpgp-librnp should always be preferred over sequoia-octopus-librnp, unless user explicitly wants it.
See my WIP at https://build.opensuse.org/project/show/home:etamPL:branches:mozilla:experim...
Here's what I did (just the important bits): MozillaThunderbird.spec Requires: %{name}-openpgp Recommends: %{name}-openpgp-librnp %package openpgp-librnp Provides: %{name}-openpgp Conflicts: %{name}-openpgp
sequoia-octopus-librnp.spec Provides: MozillaThunderbird-openpgp Conflicts: MozillaThunderbird-openpgp
And it works. Even on a fresh system "zypper in --no-recommends MozillaThunderbird" pulls MozillaThunderbird-openpgp-librnp, but I'm not quite sure if it's something I can rely on. With "--no-recommends" how is zypper choosing MozillaThunderbird-openpgp-librnp over sequoia-octopus-librnp?
It just takes the first package in alphabetical order.
See also
https://lists.opensuse.org/archives/list/factory@lists.opensuse.org/message/...
So I'm just lucky, but in a reproducible way :) good to know.
Unless you add "Suggests:" to prefer a particular implementation. :)
According to https://en.opensuse.org/Libzypp/Dependencies "Suggests are just hints for an application and not handled during dependency resolution.". I just checked how it's done in Fedora and indeed they use "Suggests". Now I'm confused. Is it used during dependency resolution or not?