Description of problem: As dnf on F23+ uses python3 default, this package should pull python3-dnf-plugin-system-upgrade for F23+ branches. when fedup package is updated on my system I get only python2 subpackage and "dnf --help" failed to show system-upgrade as available plugin. Version-Release number of selected component (if applicable): dnf-plugin-system-upgrade-0.4.0-1.fc23.noarch FIX: just change in spec file Requires: python-%{name} to Requires: python3-%{name} Thanks.
Hmm. This is supposed to be handled automatically by the %{python_provides} macro, as described in the Python packaging guidelines here: https://fedoraproject.org/wiki/Packaging:Python#The_.25python_provide_macro dnf-plugin-system-upgrade follows the example given in that page, so in F22 python-%{name} is provided by python2-%{name}, and the python2 version is pulled in - as you can see here: http://koji.fedoraproject.org/koji/rpminfo?rpmID=6732806 In F23 the python3 subpackage should Provide python-%{name}, but it doesn't: http://koji.fedoraproject.org/koji/rpminfo?rpmID=6732820 As far as I can tell I followed the instructions in the Python packaging guidelines, so this seems like it might be a problem with the %{python_provides} macro implementation?
%python_provide does not set Requires. it only adds "Provides: python-foo" to python2-foo packages, and "Provides: python2-foo" to python-foo packages. It seems to state that relatively clearly in the guidelines - there is no mention of "Requires" in that section.
(In reply to Orion Poplawski from comment #2) > %python_provide does not set Requires. it only adds "Provides: python-foo" > to python2-foo packages, and "Provides: python2-foo" to python-foo packages. > It seems to state that relatively clearly in the guidelines - there is no > mention of "Requires" in that section. No, but that's the point of having the %{python-provides} macro. The guidelines say it's to be used: To avoid having to alter every python module package when this change happens, and to allow the same spec to build for releases with different system versions of python [...] So that macro seems to exist to *allow* other packages to do "Require: python-%{name}" to pull in the correct python2 or python3 version as appropriate for the system. It's supposed to work like so: When given (as an argument) the name of the current subpackage, it will evaluate to either the proper Provide: line or nothing at all as appropriate for the version of the system runtime. So if you do as it says in the example (and as I did in this spec): %package -n python2-%{srcname} Summary: An example python module %{?python_provide:%python_provide python2-%{srcname}} [...] %package -n python3-%{srcname} Summary: An example python module %{?python_provide:%python_provide python3-%{srcname}} For F22, the %{?python_provide:...} line will evaluate to "Provide: python-%{name}" *only* in the python2 subpackage, and the other one will be empty. For F23, that line should "evaluate to either the proper Provide: line ... as appropriate for the version of the system runtime", meaning it should only appear for the *python3* subpackage. In other words, if those macros work as described: * For F22 and earlier, the python2-%{name} package will Provide: python-%{name}. * For F23 and later, the python3-%{name} package will Provide: python-%{name}. Except my F23 builds *don't* have the Provide: python-%{name} in the python3 subpackage. So I'm pretty sure the macro isn't working right in F23. (rkuska, I'm CC'ing you at sgallagh's suggestion - any ideas?)
I think until /usr/bin/python points to /usr/bin/python3, the python-foo provides will be tied to the python2 package. In any case, the macro certainly does this at the moment.
https://github.com/rpm-software-management/dnf-plugin-system-upgrade/pull/14
dnf-plugin-system-upgrade-0.4.1-1.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15941
dnf-plugin-system-upgrade-0.4.1-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15940
dnf-plugin-system-upgrade-0.4.1-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15942
dnf-plugin-system-upgrade-0.4.1-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update dnf-plugin-system-upgrade'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15940
dnf-plugin-system-upgrade-0.4.1-1.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update dnf-plugin-system-upgrade'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15941
dnf-plugin-system-upgrade-0.4.1-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update dnf-plugin-system-upgrade'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15942
dnf-plugin-system-upgrade-0.4.1-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
dnf-plugin-system-upgrade-0.4.1-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.