The new python2-2.7.12-9.fc26.x86_64 python-libs subpackage provides python(abi) As it can be seen in $ dnf --disablerepo=* --enablerepo=rawhide repoquery python2-libs --provides libpython2.7.so.1.0 libpython2.7.so.1.0()(64bit) python(abi) = 2.7 python-libs = 2.7.12-9.fc26 python-libs(x86-32) = 2.7.12-9.fc26 python-libs(x86-64) = 2.7.12-9.fc26 python2-libs = 2.7.12-9.fc26 python2-libs(x86-32) = 2.7.12-9.fc26 python2-libs(x86-64) = 2.7.12-9.fc26 python2.7dist(python) = 2.7.12 python2dist(python) = 2.7.12 When installing a python2-* package in mock, the system is happy enough installing python2-libs and no /usr/bin/python2.MINOR is provided. Is this the desired behaviour for this change?
On my Fedora 25: $ rpm -q --provides python-libs libpython2.7.so.1.0()(64bit) python(abi) = 2.7 python-libs = 2.7.12-7.fc25 python-libs(x86-64) = 2.7.12-7.fc25 python2.7dist(python) = 2.7.12 python2dist(python) = 2.7.12 And on Fedora 24: $ dnf repoquery --provides python-libs --disablerepo=\* --enablerepo=fedora --releasever=24 libpython2.7.so.1.0 libpython2.7.so.1.0()(64bit) python(abi) = 2.7 python-libs = 2.7.11-4.fc24 python-libs = 2.7.12-7.fc25 python-libs(x86-32) = 2.7.11-4.fc24 python-libs(x86-64) = 2.7.11-4.fc24 python-libs(x86-64) = 2.7.12-7.fc25 python2.7dist(python) = 2.7.12 python2dist(python) = 2.7.12 So this was not actually changed with the rename. On the other hand, this is not the case for python3, where python(abi) is only provided by python3: $ rpm -q --provides python3-libs python3-enum34 = 1.0.4-5.fc25 python3-libs = 3.5.2-4.fc25 python3-libs(x86-64) = 3.5.2-4.fc25 $ rpm -q --provides python3 python(abi) = 3.5 python3 = 3.5.2-4.fc25 python3(x86-64) = 3.5.2-4.fc25 python35 = 3.5.2-4.fc25 So this definitively needs uniting.
The F24 output above is obviously mixed with my installed Python, sorry: $ dnf repoquery --provides python-libs-0:2.7.11-4.fc24.x86_64 --disablerepo=\* --enablerepo=fedora --releasever=24 libpython2.7.so.1.0()(64bit) python-libs = 2.7.11-4.fc24 python-libs(x86-64) = 2.7.11-4.fc24 So this changed between F24 and F25. There's a code in /usr/lib/rpm/pythondistdeps.py (introduced in F25): if Provides: # If egg/dist metadata says package name is python, we provide python(abi) if dist.key == 'python': name = 'python(abi)' if name not in py_deps: py_deps[name] = [] py_deps[name].append(('==', dist.py_version)) This code basically adds python(abi) to a package that has python2dist(python), and this (I believe) is wrong. The original provide for that is supposed to be added to the packages owning the binary [/usr/lib/rpm/pythondeps.sh]: # Match buildroot/payload paths of the form # /PATH/OF/BUILDROOT/usr/bin/pythonMAJOR.MINOR # generating a line of the form # python(abi) = MAJOR.MINOR # (Don't match against -config tools e.g. /usr/bin/python2.6-config) grep "/usr/bin/python.\..$" \ | sed -e "s|.*/usr/bin/python\(.\..\)|python(abi) = \1|"
(In reply to Miro Hrončok from comment #2) > > There's a code in /usr/lib/rpm/pythondistdeps.py (introduced in F25): > > if Provides: > # If egg/dist metadata says package name is python, we provide > python(abi) > if dist.key == 'python': > name = 'python(abi)' > if name not in py_deps: > py_deps[name] = [] > py_deps[name].append(('==', dist.py_version)) > > > This code basically adds python(abi) to a package that has > python2dist(python), and this (I believe) is wrong. > Hmm, I'm not sure if there's supposed to be a "python2dist(python)" at all. I don't see a corresponding "python3dist(python)" occurring for Python 3. Does Python 2 have dist metadata?
/usr/lib64/python2.7/lib-dynload/Python-2.7.12-py2.7.egg-info
So the generator adds python(abi) = 2.7 to python-libs because it ships /usr/lib64/python2.7/lib-dynload/Python-2.7.12-py2.7.egg-info which says "This is Sparta! ... ehm, Python". What about just adding a requires from the python-lib to the python package?
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle. Changing version to '26'.
(In reply to Florian Festi from comment #5) > What about just adding a requires from the python-lib to the python package? -> tossing back to python2 and rawhide. In any case rpm can't really do anything here as the python generators have been moved to python-rpm-generators nowadays.
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle. Changing version to '28'.
https://github.com/rpm-software-management/rpm/issues/395
$ repoquery --releasever 26 --disablerepo='*' --enablerepo=fedora --enablerepo=updates --whatprovides 'python(abi)' python2-0:2.7.14-7.fc26.i686 python2-0:2.7.14-7.fc26.x86_64 python2-libs-0:2.7.14-7.fc26.i686 python2-libs-0:2.7.14-7.fc26.x86_64 python3-0:3.6.5-1.fc26.i686 python3-0:3.6.5-1.fc26.x86_64 $ repoquery --releasever 27 --disablerepo='*' --enablerepo=fedora --enablerepo=updates --whatprovides 'python(abi)' python2-0:2.7.14-10.fc27.i686 python2-0:2.7.14-10.fc27.x86_64 python3-0:3.6.5-1.fc27.i686 python3-0:3.6.5-1.fc27.x86_64 $ repoquery --releasever 28 --disablerepo='*' --enablerepo=fedora --enablerepo=updates --whatprovides 'python(abi)' python2-0:2.7.14-15.fc28.i686 python2-0:2.7.14-15.fc28.x86_64 python3-0:3.6.5-1.fc28.i686 python3-0:3.6.5-1.fc28.x86_64 $ repoquery --releasever rawhide --disablerepo='*' --enablerepo=fedora --enablerepo=updates --whatprovides 'python(abi)' Poslední kontrola metadat: před 2:48:52, Út 10. duben 2018, 12:31:58 CEST. python2-0:2.7.14-15.fc29.i686 python2-0:2.7.14-15.fc29.x86_64 python3-0:3.6.5-1.fc29.i686 python3-0:3.6.5-1.fc29.x86_64 This is only bug on Fedora 26 where I don't feel like investing the time in it is worth it.