Handling mutually excluding alternatives
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?
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/...
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/...
Unless you add "Suggests:" to prefer a particular implementation. :) -- 真実はいつも一つ!/ Always, there's only one truth!
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?
On Tue, Feb 27, 2024 at 7:25 AM Adam Mizerski <adam@mizerski.pl> wrote:
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?
It is. The libzypp documentation has been wrong for a long time. Suggests are used as solver hints in cases of "unresolvables" (that is, situations where multiple providers exist and there's no obvious way to pick a provider). The fallback logic in both libdnf and libzypp is to sort alphabetically based on your system locale to pick a provider. But Suggests will give libsolv a hint of what to pick when no obvious provider can be selected. -- 真実はいつも一つ!/ Always, there's only one truth!
On Tue, Feb 27, 2024 at 3:25 PM Adam Mizerski <adam@mizerski.pl> wrote:
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?
Apparently zypper is using it to break the tie.
participants (3)
-
Adam Mizerski
-
Andrei Borzenkov
-
Neal Gompa