Red Hat Bugzilla – Bug 1263282
yum should clean up it's .pyo files when removed (via rpm or dnf)
Last modified: 2016-07-19 13:54:00 EDT
Description of problem:
I remove package with yum and the pyo files stay in directory. It is problem, because the model is possible to import to code. I get error when I try use dnf-plugin-spacewalk.
>> ls /usr/lib/python2.7/site-packages/yum/
callbacks.pyo drpm.pyo __init__.pyo packageSack.pyo plugins.pyo sqlitesack.pyo
comps.pyo Errors.pyo i18n.pyo packages.pyo repoMDObject.pyo sqlutils.pyo
config.pyo fssnapshots.pyo logginglevels.pyo parser.pyo repos.pyo transactioninfo.pyo
constants.pyo history.pyo metalink.pyo pgpmsg.pyo rpmsack.pyo update_md.pyo
depsolve.pyo igroups.pyo misc.pyo pkgtag_db.pyo rpmtrans.pyo yumRepo.pyo
>> dnf provides /usr/lib/python2.7/site-packages/yum/__init__.py
Failed loading plugin: spacewalk
Last metadata expiration check performed 0:19:15 ago on Tue Sep 15 13:11:46 2015.
yum-3.4.3-505.fc22.noarch : RPM package installer/updater/manager
Repo : fedora
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. dnf install yum-rhn-plugin yum
2. dnf remove yum-rhn-plugin yum
3. dnf install dnf-plugin-spacewalk
>> dnf repolist
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/dnf/plugin.py", line 124, in import_modules
module = importlib.import_module(name)
File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
File "/usr/lib/python2.7/site-packages/dnf-plugins/spacewalk.py", line 34, in <module>
File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 3, in <module>
File "/usr/share/rhn/up2date_client/rhnserver.py", line 34, in <module>
File "/usr/share/rhn/up2date_client/rpcServer.py", line 11, in <module>
File "/usr/share/rhn/up2date_client/clientCaps.py", line 10, in <module>
from capabilities import parseCap
File "/usr/share/rhn/up2date_client/capabilities.py", line 4, in <module>
File "/usr/share/rhn/up2date_client/up2dateErrors.py", line 98, in <module>
from yum.Errors import RepoError
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 52, in <module>
AttributeError: 'module' object has no attribute 'i18n'
This should be fixed in yum packaging.
Solution would be including .pyo files as %ghost into package.
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.