Bug 1260164
Summary: | Fix default Requires: to its python3 subpackage | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Parag Nemade <pnemade> |
Component: | dnf-plugin-system-upgrade | Assignee: | Will Woods <wwoods> |
Status: | CLOSED NEXTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 23 | CC: | johannespfrang, klember, orion, rkuska, wwoods |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | 0.4.1-1.fc23 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-09-18 01:31:33 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Parag Nemade
2015-09-04 15:42:53 UTC
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. 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. |