Issue #5126
closedPlugin "pulp-profile-update" can't be imported
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
Added by mdellweg over 5 years ago
Updated by mdellweg over 5 years ago
- Status changed from NEW to MODIFIED
Applied in changeset pulp|c82d8a185542e66fa1685ef4feac2c0e3c88211f.
Updated by dkliban@redhat.com over 5 years ago
- Assignee set to mdellweg
- Version set to 2.20.0
Updated by bmbouter about 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Use 'pulp-common' to retrieve the package version
closes #5126 https://pulp.plan.io/issues/5126