Project

Profile

Help

Issue #5126

closed

Plugin "pulp-profile-update" can't be imported

Added by dkliban@redhat.com over 5 years ago. Updated almost 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
2.20.0
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

The user initially reported the problem on the list[0]. Here is the last message:

d, m = os.path.split('/usr/lib/yum-plugins/pulp-profile-update.py')
m = m.split('.py')[0]
m

'pulp-profile-update'

d

'/usr/lib/yum-plugins'

imp.find_module(m, [d])

(<open file '/usr/lib/yum-plugins/pulp-profile-update.py', mode 'U' at 0x7f996857d540>, '/usr/lib/yum-plugins/pulp-profile-update.py', ('.py', 'U', 1))

f, p, d = imp.find_module(m, [d])
imp.load_module(m, f, p, d)

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/yum-plugins/pulp-profile-update.py", line 5, in <module>
from pulp.bindings.server import PulpConnection
File "/usr/lib/python2.7/site-packages/pulp/bindings/server.py", line 18, in <module>
from pulp.common.constants import DEFAULT_CA_PATH
File "/usr/lib/python2.7/site-packages/pulp/common/constants.py", line 5, in <module>
PULP_VERSION = pkg_resources.require('pulp-server')[0].version
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 728, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 626, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pulp-server

"PULP_VERSION = pkg_resources.require('pulp-server')[0].version" was introduced in https://github.com/pulp/pulp/commit/19a527036d4e1b3ed06037ada70a5de5cd556940 and was released with 2.20.0. I checked 2.19.1 RPM does not include this line. Obviously client side will not have pulp-server package and will thus fail.

[0] https://www.redhat.com/archives/pulp-list/2019-July/msg00021.html

Also available in: Atom PDF