Bug 206121 - devel/py-pbr: Missing dependency (ImportError: No module named babel.messages.frontend)
Summary: devel/py-pbr: Missing dependency (ImportError: No module named babel.messages...
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kubilay Kocak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-11 00:53 UTC by mepholic
Modified: 2016-02-09 07:58 UTC (History)
0 users

See Also:
koobs: maintainer-feedback+


Attachments
pkg version -v (12.75 KB, text/plain)
2016-01-11 04:44 UTC, mepholic
no flags Details
python 2.7 site-packages (7.47 KB, text/plain)
2016-01-28 03:51 UTC, mepholic
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description mepholic 2016-01-11 00:53:12 UTC
I updated my ports tree on 2016-01-08 on a new install of FreeBSD 10.2. I was attempting to install the security/letsencrypt package, which depended on devel/py-pbr. The installation of devel/py-pbr failed. This was the error it threw:

===>  Cleaning for py27-pbr-1.8.1
===>  License APACHE20 accepted by the user
===>   py27-pbr-1.8.1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by py27-pbr-1.8.1 for building
===>  Extracting for py27-pbr-1.8.1
=> SHA256 Checksum OK for pbr-1.8.1.tar.gz.
===>  Patching for py27-pbr-1.8.1
===>   py27-pbr-1.8.1 depends on package: py27-setuptools27>0 - found
===>   py27-pbr-1.8.1 depends on file: /usr/local/bin/python2.7 - found
===>  Configuring for py27-pbr-1.8.1
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "setup.py", line 22, in <module>
    **util.cfg_to_args())
  File "pbr/util.py", line 261, in cfg_to_args
    wrap_commands(kwargs)
  File "pbr/util.py", line 541, in wrap_commands
    for cmd, _ in dist.get_command_list():
  File "/usr/local/lib/python2.7/site-packages/setuptools/dist.py", line 446, in get_command_list
    cmdclass = ep.resolve()
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2386, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
ImportError: No module named babel.messages.frontend
*** Error code 1
Stop.
make: stopped in /usr/ports/devel/py-pbr
===>>> make build failed for devel/py-pbr
===>>> Aborting update
===>>> Update for devel/py-pbr failed
===>>> Aborting update

To resolve this, I installed devel/py-babel. After installing devel/py-babel, the installation of devel/py-pbr, and subsequently security/letsencrypt completed successfully.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-11 04:30:32 UTC
Thank you for your report :) Which branch of the ports tree was this using? Quarterly? Latest?

Could you please add (as an attachment) the output of `pkg version -v`
Comment 2 mepholic 2016-01-11 04:44:58 UTC
Created attachment 165385 [details]
pkg version -v
Comment 3 mepholic 2016-01-11 04:58:11 UTC
I've attached the requested output.

I'm not actually sure what ports branch I'm on. I'd guess latest, as I updated my system using a portsnap fetch and update, for which I'm using portsnap.freebsd.org. I have not modified my /etc/portsnap.conf since I installed FreeBSD 10.2. Checking the INDEX files in ports reveals that I have packages up to 2016-01-08.

If you have any suggestions on how I can discover which branch I'm currently tracking, so that I can further assist, that would be great!
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-28 03:27:06 UTC
I can't reproduce the build failure mentioned in comment 0. I also can't find references to babel in the pbr sources.

Can you please include (as an attachment) the contents (ls -la) of /usr/local/lib/python2.7/site-packages please, as this may be a corrupt python site-packages environment.

Do you use pip to install things into the system python environment?
Comment 5 mepholic 2016-01-28 03:51:19 UTC
Created attachment 166218 [details]
python 2.7 site-packages
Comment 6 mepholic 2016-01-28 03:52:32 UTC
I've attached the output from ls -la /usr/local/lib/python2.7/site-packages

I've never used pip to install any Python libraries on here before.
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-28 04:00:28 UTC
There are duplicate references to the following python packages:

drwxr-xr-x   2 root  wheel     512 Aug 28 15:13 Babel-2.0-py2.7.egg-info
drwxr-xr-x   2 root  wheel     512 Jan 10 19:39 Babel-2.1.1-py2.7.egg-info

drwxr-xr-x   2 root  wheel     512 Aug 28 15:13 pbr-0.11.0.dist-info
drwxr-xr-x   2 root  wheel     512 Jan 10 19:40 pbr-1.8.1-py2.7.egg-info

drwxr-xr-x   2 root  wheel     512 Aug 28 15:13 pytz-2015.4.dist-info
drwxr-xr-x   2 root  wheel     512 Jan 10 19:37 pytz-2015.7-py2.7.egg-info

Can you remove the older directories (Aug 28), including *both* Babel directories, rebuild pbr and let me know if the issue remains
Comment 8 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-28 04:01:45 UTC
The theory at this point is that the older version of Babel is causing the issue. I cannot explain yet however, what is referencing babel, as it doesn't appear to be pbr
Comment 9 Kubilay Kocak freebsd_committer freebsd_triage 2016-02-09 07:58:04 UTC
Please re-open this issue if you continue to see errors are removing the duplicate packages as mentioned in comment 7