Project

Profile

Help

Issue #5126

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

Added by dkliban@redhat.com over 1 year ago. Updated about 1 year 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

Associated revisions

Revision c82d8a18 View on GitHub
Added by mdellweg over 1 year ago

Use 'pulp-common' to retrieve the package version

closes #5126 https://pulp.plan.io/issues/5126

History

#1 Updated by mdellweg over 1 year ago

  • Status changed from NEW to MODIFIED

#2 Updated by dkliban@redhat.com over 1 year ago

  • Assignee set to mdellweg
  • Version set to 2.20.0

#3 Updated by bmbouter about 1 year ago

  • Sprint/Milestone set to 3.0.0

#4 Updated by bmbouter about 1 year ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF