Bug 2235578 - tracer crashes: AttributeError: module 'rpm' has no attribute 'fi'. Did you mean: 'fd'?
Summary: tracer crashes: AttributeError: module 'rpm' has no attribute 'fi'. Did you m...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: tracer
Version: 39
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Jakub Kadlčík
QA Contact: Fedora Extras Quality Assurance
URL: https://cockpit-logs.us-east-1.linode...
Whiteboard: CockpitTest
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-08-29 06:45 UTC by Martin Pitt
Modified: 2023-09-23 00:17 UTC (History)
5 users (show)

Fixed In Version: tracer-1.0-1.fc39
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-23 00:17:09 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Martin Pitt 2023-08-29 06:45:17 UTC
Running tracer after installing some updates crashes with a Python error:

# tracer
Traceback (most recent call last):
  File "/usr/bin/tracer", line 34, in <module>
    tracer.main.run()
  File "/usr/lib/python3.12/site-packages/tracer/main.py", line 51, in run
    return router.dispatch()
           ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/tracer/resources/router.py", line 52, in dispatch
    controller = DefaultController(self.args, self.packages)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/tracer/controllers/default.py", line 62, in __init__
    self.applications = self.tracer.trace_affected(self._user(args.user))
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/tracer/resources/tracer.py", line 99, in trace_affected
    for file in self._PACKAGE_MANAGER.package_files(package.name):
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/tracer/resources/PackageManager.py", line 55, in package_files
    return self.package_managers[0].package_files(pkg_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/tracer/packageManagers/dnf.py", line 52, in package_files
    return super(Dnf, self).package_files(pkg_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/tracer/packageManagers/rpm.py", line 105, in package_files
    fi = rpm.fi(next(mi))
         ^^^^^^
AttributeError: module 'rpm' has no attribute 'fi'. Did you mean: 'fd'?

This might well be a bug in dnf, please reassign as appropriate.


Reproducible: Always

Steps to Reproduce:
see above, just run "tracer" after installing an update



python3-libdnf-0.70.2-1.fc39.x86_64
python3-dnf-4.16.2-2.fc39.noarch
python3-tracer-0.7.11-3.fc39.noarch

Comment 1 Jakub Kadlčík 2023-08-29 13:02:15 UTC
Hello Martin,
thank you for the report.

We have an upstream issue for this
https://github.com/FrostyX/tracer/issues/198

I created a PR with a fix
https://github.com/FrostyX/tracer/pull/199

It didn't get any negative feedback, so I will merge it and create a new Tracer release.

Comment 2 Fedora Update System 2023-09-14 18:55:48 UTC
FEDORA-2023-77300ab99a has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-77300ab99a

Comment 3 Adam Williamson 2023-09-14 18:56:45 UTC
I went ahead and backported the current state of the PR. It seems harmless even if you tweak it upstream - the current version should still fix the problem, and whenever you cut a new release, we'll just drop the backport.

Comment 4 Jakub Kadlčík 2023-09-14 19:33:58 UTC
Thank you very much for stepping in Adam,
there are two important PRs (unrelated to this issue) that I'd like to get merged, and then I will do a new release. Probably some time next week.

Comment 5 Fedora Update System 2023-09-15 02:28:54 UTC
FEDORA-2023-bfed0c61fe has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-bfed0c61fe`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-bfed0c61fe

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2023-09-23 00:17:09 UTC
FEDORA-2023-bfed0c61fe has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.