DNF: "There are following alternatives to this package"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!
We'd like to propose a new functionality for dnf: When a user tries to install a package XYZ and dnf doesn't find it, dnf would recommend them alternative packages. These offered packages would advertise that they are an alternative for XYZ using a specially formatted Provides tag.

For example, packages `python2-requests` and `python3-requests` would both have the following tag:

    Provides: alternative-for(python-requests) = %{version}-%{release}

(Possibly via the already existing and widespread %python_provide macro in the Python case.)

And when the user would try to install `python-requests`, dnf would look for packages with the relevant Provides tag and display them:

    # dnf install python-requests
      * There are following alternatives to this package: python2-requests python3-requests
    No match for argument: python-requests
    Error: Unable to find a match

This would be very similar to an already existing functionality that searches for lowercase package names:

    # dnf install python3-REQUESTS
      * Maybe you meant: python3-requests
    No match for argument: python3-REQUESTS
    Error: Unable to find a match

(That functionality is broken in some versions—RHBZ#1628514—so you might not see this result at the moment.)

What are your thoughts?

One possible addition would be to include a parameter for weight in the Provides tag, so that python3-requests could be listed as the preferred option before python2-requests.

All the best,
Tomas Orsava
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux