On Thu, 2018-09-13 at 18:17 +0200, Tomas Orsava wrote: > 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? It's neat, but it doesn't help catch typos, which seems like the most probably case where I'd want such a feature. How about instead of a scheme based on provides, just quickly check if a package has a "similar" name? Basically extend the existing check for lowercase you mention. $ git stats git: 'stats' is not a git command. See 'git --help'. The most similar command is status -- Mathieu _______________________________________________ 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