Mock doesn't work

Bug #600564 reported by Francisco Javier Cuadrado
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
mock (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: mock

Description: Ubuntu 10.04 LTS
Release: 10.04
Package: mock
Version: 0.9.7-3

Hi!

I'm trying to execute mock but it doesn't work, it shows the following message:

-- snip --
$ mock
Traceback (most recent call last):
File "/usr/sbin/mock", line 61, in <module>
import mock.exception ImportError: No module named mock.exception
-- snip --

I've looked mock code and I've saw that it searches its modules in a directory that doesn't exist, these directories are:

-- snip --
PYTHONDIR="/usr/lib/python2.6/site-packages"
PKGPYTHONDIR="/var/lib/python-support/python2.5/mock"
-- snip --

I think that is a problem with Python 2.6 and mock that expects to use python 2.5.

Regards,
Fran

Tags: mock python
Revision history for this message
eXtace (djandruczyk) wrote :

This affects me as well. So far I haven't been able to figure it out.

Revision history for this message
Ryan Bianchi (infornography-ca) wrote :

If you do a `dpkg -l mock`, you'll see that it tries to install a bunch of files under "/var/lib/python-support/python2.5". However, it doesn't actually create the necessary directory.

As a workaround, you can `ln -s /var/lib/python-support/python2.6 /var/lib/python-support/python2.5`. Seems to appease it for now.

Revision history for this message
Tully (tully.foote) wrote :

This is very similar to https://bugs.launchpad.net/ubuntu/+source/mock/+bug/303154 it's almost a regression?

I got this to work by updating the pkgpython as noted in the above ticket.

While I was at it I upgraded to 1.1.10 as well and the only change I made to rebuild the debs besides updating the changelog was to set the pkgpythondir differently.

Attached is the new rules file with the one line change.

Revision history for this message
Mike Miller (mtmiller) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. However, I am closing it because the bug has been fixed in the latest development version of Ubuntu - Trusty Tahr.

If you need a fix for the bug in previous versions of Ubuntu, please follow the instructions for "Requesting a Backport" at https://wiki.ubuntu.com/UbuntuBackports#Requesting_a_Backport

Changed in mock (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.