> This is what happens then dpkg upgrades 3.0.1-1 -> 3.0.1-2:
>
> 1) It replaces /usr/share/pyshared/gsw-3.0.1.egg-info (a regular file)
> with a directory.
> 2) It DOESN'T replace
> /usr/lib/python2.7/dist-packages/gsw-3.0.1.egg-info with a directory,
> because it's now a symlink to a directory.
> 3) It follows the symlink when creating
> /usr/lib/python2.7/dist-packages/gsw-3.0.1.egg-info/dependency_links.txt.
>
> So you end up with two files
> (/usr/share/pyshared/gsw-3.0.1.egg-info/dependency_links.txt and
> /usr/lib/python2.7/dist-packages/gsw-3.0.1.egg-info/dependency_links.txt)
> installed under the same name. This makes dpkg unhappy.
>
>
> Okay, so why .egg-info suddenly became a directory? It's because of
> this fragment of setup.py:
> | try:
> |     from setuptools import setup
> |     from setuptools.command.sdist import sdist
> | except ImportError:
> |     from distutils.core import setup
> |     from distutils.command.sdist import sdist
>
> Setuptools creates .egg-info as a directory (putting some extra
> metadata there), while distutils always creates .egg-info as a file.
> Apparently 3.0.1-2 was built in a non-minimal environment which had
> python-setuptools installed.
>
Hi Jakub,

Thanks for this analysis. It looks like the best approach would be to
add a Build-Depends on python-setuptools
(to ensure it _always_ rather than accidentally happens, and because it
seems to be the preferred approach
from the setup.py file), and delete the symlink from -1 in the preinst
of the replacement package?

regards
Alastair


-- 
Alastair McKinstry  , <alast...@sceal.ie> , <mckins...@debian.org>    
http://blog.sceal.ie

Anyone who believes exponential growth can go on forever in a finite world
is either a madman or an economist - Kenneth Boulter, Economist.


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to