Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1201464 - missing Requires: rpm-python
Summary: missing Requires: rpm-python
Alias: None
Product: Fedora
Classification: Fedora
Component: tracer
Version: 23
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Jakub Kadlčík
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2015-03-12 18:10 UTC by Radek Holy
Modified: 2015-10-06 02:14 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-08-19 10:40:10 UTC
Type: Bug

Attachments (Terms of Use)

Description Radek Holy 2015-03-12 18:10:59 UTC
Description of problem:
Tracer tries to "import rpm" while there is a missing "Requires: rpm-python" in the spec file.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. mock -r fedora-rawhide-x86_64 --install python3-dnf-plugins-extras-tracer
2. mock -r fedora-rawhide-x86_64 --quiet --chroot "dnf-3 install mc"

Actual results:
  gpm-libs.x86_64 1.20.7-6.fc22            mc.x86_64 1:4.8.13-2.fc23           
  slang.x86_64 2.3.0-1.fc22               

Traceback (most recent call last):
  File "/usr/bin/tracer", line 34, in <module>
  File "/usr/lib/python2.7/site-packages/tracer/main.py", line 42, in run
    return router.dispatch()
  File "/usr/lib/python2.7/site-packages/tracer/resources/router.py", line 55, in dispatch
    controller = DefaultController(self.args, self.packages)
  File "/usr/lib/python2.7/site-packages/tracer/controllers/default.py", line 40, in __init__
    self.tracer = Tracer(System.package_manager(), Rules, Applications, memory=dump_memory)
  File "/usr/lib/python2.7/site-packages/tracer/resources/system.py", line 62, in package_manager
    return PackageManager(*map(get_instance, managers[distro]))
  File "/usr/lib/python2.7/site-packages/tracer/resources/system.py", line 45, in get_instance
    module = importlib.import_module(path)
  File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
  File "/usr/lib/python2.7/site-packages/tracer/packageManagers/dnf.py", line 25, in <module>
    from tracer.packageManagers.rpm import Rpm
  File "/usr/lib/python2.7/site-packages/tracer/packageManagers/rpm.py", line 32, in <module>
    import rpm
ImportError: No module named rpm
You should restart:
  Nothing needs to be restarted

Expected results:
Tracer shouldn't fail with an ImportError.

Comment 1 Jakub Kadlčík 2015-03-14 09:45:42 UTC
Thank you @rholy,

I've assumed that `rpm-python` is installed everywhere just because of the fact, that DNF or YUM are in python and do things with rpm packages :-D

Dependency added in https://github.com/FrostyX/tracer/commit/200fef141da24af4c91043d2dbf7f3835445a06a

Comment 2 Radek Holy 2015-03-16 13:28:06 UTC
Hm, actually, the reproducer could be simpler since DNF is not needed at all:

mock --install tracer
mock --quiet --chroot tracer

As you can see, neither YUM nor DNF is present in default Mock chroots and IIRC they also are not necessary in Docker containers.

Anyway, thank you for the fix.

Comment 3 Jan Kurik 2015-07-15 14:24:52 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:

Comment 4 Jakub Kadlčík 2015-08-19 10:40:10 UTC
Dependency was added in 0.5.9 version which is now stable for the long time. So I am closing this issue.

Thank you again for posting it.

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