libpython2.6 package contains broken symlink

Bug #521050 reported by Carl Meyer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python2.6 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: python2.6

The libpython2.6 package (version 2.6.4-0ubuntu3) installs a broken symlink into /usr/lib/python2.6/config/libpython2.6.so. The symlink is pointing to ../../libpython2.6.so (i.e. /usr/lib/libpython2.6.so), but that file does not exist. /usr/lib/libpython2.6.so.1 does exist.

I discovered this problem by trying to run the tests for a package that uses ScriptTest (http://pypi.python.org/pypi/ScriptTest), which creates a Python virtualenv (which symlinks a small portion of /usr/lib/python2.6 into the virtualenv, for bootstrapping) and then does some kind of traversal through the virtualenv's symlinked lib/ dir, barfing on the broken symlink with the following traceback:

Traceback (most recent call last):
  File "tests/test_pip.py", line 140, in <module>
    main()
  File "tests/test_pip.py", line 121, in main
    reset_env()
  File "tests/test_pip.py", line 41, in reset_env
    env.run(sys.executable, '-m', 'virtualenv', '--no-site-packages', env.base_path)
  File "/home/carljm/projects/pip/piptests_env/lib/python2.6/site-packages/scripttest/__init__.py", line 137, in run
    files_after = self._find_files()
  File "/home/carljm/projects/pip/piptests_env/lib/python2.6/site-packages/scripttest/__init__.py", line 169, in _find_files
    self._find_traverse(fn, result)
  File "/home/carljm/projects/pip/piptests_env/lib/python2.6/site-packages/scripttest/__init__.py", line 187, in _find_traverse
    self._find_traverse(fn, result)
  File "/home/carljm/projects/pip/piptests_env/lib/python2.6/site-packages/scripttest/__init__.py", line 187, in _find_traverse
    self._find_traverse(fn, result)
  File "/home/carljm/projects/pip/piptests_env/lib/python2.6/site-packages/scripttest/__init__.py", line 187, in _find_traverse
    self._find_traverse(fn, result)
  File "/home/carljm/projects/pip/piptests_env/lib/python2.6/site-packages/scripttest/__init__.py", line 189, in _find_traverse
    result[path] = FoundFile(self.base_path, path)
  File "/home/carljm/projects/pip/piptests_env/lib/python2.6/site-packages/scripttest/__init__.py", line 380, in __init__
    self.stat = os.stat(self.full)
OSError: [Errno 2] No such file or directory: '/home/carljm/projects/pip/pip/tests/test-scratch/lib/python2.6/config/libpython2.6.so'

Related branches

Revision history for this message
Carl Meyer (carljm) wrote :

Successful workaround:

carljm@arugula:~/projects/pip/pip$ cd /usr/lib/
carljm@arugula:/usr/lib$ sudo ln -s libpython2.6.so.1 libpython2.6.so
[sudo] password for carljm:
carljm@arugula:/usr/lib$ ls -la libpython*
lrwxrwxrwx 1 root root 17 2010-02-12 11:02 libpython2.6.so -> libpython2.6.so.1
lrwxrwxrwx 1 root root 19 2010-02-11 12:12 libpython2.6.so.1 -> libpython2.6.so.1.0
-rw-r--r-- 1 root root 2346612 2009-12-07 14:38 libpython2.6.so.1.0
carljm@arugula:/usr/lib$

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python2.6 - 2.6.4-6ubuntu1

---------------
python2.6 (2.6.4-6ubuntu1) lucid; urgency=low

  * Merge with Debian (2.6.4-6).

python2.6 (2.6.4-6) unstable; urgency=low

  * Update to 20100215, taken from the 2.6 release branch.
  * python2.6-minimal: Skip moving syssite contents to new location, if
    /usr/local/lib/python2.6 cannot be written. Closes: #569532. LP: #338227.
  * libpython2.6: Fix symlink in /usr/lib/python2.6/config. LP: #521050.
 -- Matthias Klose <email address hidden> Tue, 16 Feb 2010 01:08:50 +0100

Changed in python2.6 (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

Remote bug watches

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