Can't build correctly using brpm on cent7

Bug #1603533 reported by Joshua Harlow on 2016-07-15
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Medium
Joshua Harlow

Bug Description

Getting the following after building on cent7 and installing,

Traceback (most recent call last):
  File "/usr/bin/cloud-init", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 3007, in <module>
    working_set.require(__requires__)
  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: argparse

It appears that even though it gets added as a dep that cent7 doesn't register it correctly,

$ sudo yum install python-argparse
Loaded plugins: changelog, fastestmirror, rhnplugin, versionlock
This system is receiving updates from RHN Classic or Red Hat Satellite.
...
Package python-2.7.5-34.el7.x86_64 already installed and latest version
Nothing to do

But then when ran cloud-init has a dep on a thing that does not actually exist.

So on 2.7 we don't need to do this in the first place (the explicit dep for argparse is only for 2.6) so we can just do this smarter (and avoid this mess in the first place).

Related branches

Joshua Harlow (harlowja) on 2016-07-15
Changed in cloud-init:
assignee: nobody → Joshua Harlow (harlowja)
Joshua Harlow (harlowja) on 2016-07-21
Changed in cloud-init:
milestone: none → 0.7.7
Scott Moser (smoser) on 2016-08-05
Changed in cloud-init:
importance: Undecided → Medium
status: New → Fix Committed
Scott Moser (smoser) on 2016-08-10
Changed in cloud-init:
status: Fix Committed → Fix Released
Ryan Harper (raharper) wrote :

That fixes the package deps, but runtime still complains?

bash-4.2# yum install -v python-argparse
Loading "fastestmirror" plugin
Config time: 0.006
Yum version: 3.4.3
rpmdb time: 0.000
Setting up Package Sacks
Loading mirror speeds from cached hostfile
 * base: anorien.csc.warwick.ac.uk
 * epel: epel.mirror.far.fi
 * extras: anorien.csc.warwick.ac.uk
 * updates: anorien.csc.warwick.ac.uk
pkgsack time: 12.062
Checking for virtual provide or file-provide for python-argparse
Obs Init time: 0.150
Package python-2.7.5-48.el7.x86_64 already installed and latest version
Nothing to do

bash-4.2# cat /etc/centos-release
CentOS Linux release 7.3.1611 (Core)

bash-4.2# rpm -qa | grep cloud-init
cloud-init-0.7.9+114.g2796dab-1.el7.centos.noarch

bash-4.2# cloud-init --help
Traceback (most recent call last):
  File "/usr/bin/cloud-init", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 3007, in <module>
    working_set.require(__requires__)
  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: argparse

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers