Version: dnf-0.4.5-1.fc21.noarch Problem: AttributeError: 'Base' object has no attribute '_compare_providers' Reproducer: import dnf.base base = dnf.base.Base() print base._bestPackageFromList([1, 2]) It's related to bug#979353 - we need this functionality, preferably in hawkey, but dnf would be also acceptable.
I'm afraid this is going to be CANTFIX'd. libsolv internally considers "all" providers, and this is burried very deep. This functionality is not needed. All you can do is searching for all packages providing "foo", and excluding all but the one you want to use. But this has to run *before* depsolving, not in a callback.
Hi Dan, It has been explained many times now that the DNF API is not to be used until documentation to it is published. Therefore nothing is supported yet and it is possible things like _bestPackageFromLIst will be dropped entirely. I am afraid we can not help you here, for the reasons mentioned by Zdenek in comment 1. Also, as you mention we are already tracking this in bug 979353. > print base._bestPackageFromList([1, 2]) And we certainly will not document and support methods starting with an underscore in the API, please see PEP 0008 [1] [1] http://www.python.org/dev/peps/pep-0008/