document that there are better alternatives to alternatives? #1440

Open
opened 2025-02-10 15:00:48 +00:00 by decathorpe · 2 comments
Owner

alternatives are old and creaky and don't work everywhere. alternatives exist (based on mechanisms in RPM and / or dnf, using virtual Provides and Requires, and package swapping).

alternatives are old and creaky and don't work everywhere. alternatives exist (based on mechanisms in RPM and / or dnf, using virtual Provides and Requires, and package `swap`ping).
Owner

Examples of the RPM based way:

  • sddm-wayland-* packages
  • fedora-release-identity-* packages
  • initial-setup-gui-wayland-* packages
Examples of the RPM based way: * `sddm-wayland-*` packages * `fedora-release-identity-*` packages * `initial-setup-gui-wayland-*` packages
Owner

The RPM based way has the major disadvantage of only one provider can be selected via installation at a time, and swapping is an "expensive" package management action.

It is done by creating some kind of virtual name that all alternatives Provides and Conflicts on:

Provides: alternative(foobar)
Conflicts: alternative(foobar)

(Note it doesn't matter what this is, as long as it isn't a real package name.)

Some example virtual names in use are:

  • sddm-greeter-displayserver
    • sddm-wayland-generic
    • sddm-wayland-plasma
    • sddm-wayland-miriway
  • fedora-release-identity
    • fedora-release-identity-kde
    • fedora-release-identity-lxqt
  • firstboot(gui-backend)
    • initial-setup-gui-wayland-generic
    • initial-setup-gui-wayland-plasma
    • initial-setup-gui-wayland-miriway
  • lxqt-wayland-session-default-compositor
    • lxqt-wayland-session-default-compositor-miriway

There may be more, but these should be good enough to illustrate the model.

The only ways to switch providers is to use DNF to do it, like so:

  • dnf swap sddm-wayland-generic sddm-wayland-miriway
  • dnf install --allowerasing lxqt-wayland-session-default-compositor-miriway
The RPM based way has the major disadvantage of only one provider can be selected via installation at a time, and swapping is an "expensive" package management action. It is done by creating some kind of virtual name that all alternatives `Provides` and `Conflicts` on: ``` Provides: alternative(foobar) Conflicts: alternative(foobar) ``` (Note it doesn't matter what this is, as long as it isn't a real package name.) Some example virtual names in use are: * `sddm-greeter-displayserver` * `sddm-wayland-generic` * `sddm-wayland-plasma` * `sddm-wayland-miriway` * `fedora-release-identity` * `fedora-release-identity-kde` * `fedora-release-identity-lxqt` * `firstboot(gui-backend)` * `initial-setup-gui-wayland-generic` * `initial-setup-gui-wayland-plasma` * `initial-setup-gui-wayland-miriway` * `lxqt-wayland-session-default-compositor` * `lxqt-wayland-session-default-compositor-miriway` There may be more, but these should be good enough to illustrate the model. The only ways to switch providers is to use DNF to do it, like so: * `dnf swap sddm-wayland-generic sddm-wayland-miriway` * `dnf install --allowerasing lxqt-wayland-session-default-compositor-miriway`
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
packaging/guidelines#1440
No description provided.