[Python-modules-team] Bug#700782: python3-cxx-dev: unhandled symlink to directory conversion: /usr/include/python3.2

Andreas Beckmann anbe at debian.org
Tue Feb 19 23:19:31 UTC 2013


Control: retitle -1 python3-cxx-dev: installs files over existing symlink: /usr/include/python3.2 -> python3.2mu
Control: tag -1 - moreinfo

On 2013-02-19 21:51, Sebastian Ramacher wrote:
> On 2013-02-17 15:02:05, Andreas Beckmann wrote:
>> an upgrade test with piuparts revealed that your package installs files
>> over existing symlinks and possibly overwrites files owned by other
>> packages. This usually means an old version of the package shipped a
>> symlink but that was later replaced by a real (and non-empty)
>> directory. This kind of overwriting another package's files cannot be
>> detected by dpkg.
> 
> python3-cxx-dev installs files to /usr/include/python3.2/CXX and
> /usr/include/python3.2 is a symlink provided by python3.2-dev. However,
> no other package has ever shipped files in /usr/include/python3.2mu/CXX.
> Additionally /usr/include/python3.2 always has been a symlink to
> python3.2mu [1]. So it's neither an unhandled symlink to directory
> conversion nor overwriting files owned by other packages.

Thanks for clarifying the actual situation.
So it's *just* installing over an existing symlink. Don't do this, it 
will break in subtle ways. Is there a guarantee that python3.2-dev is 
unpacked before python3-cxx-dev? (No, see below, I tried it.) What will 
happen if python3.2-dev decides to point the symlink somewhere else? 
Just install the files to the real location.

> Maybe I'm just unable to find the policy section that forbids installing
> to locations which contain symlinks in the dirname, so could you please
> clarify why you think this bug warrants severity serious? Or am I just missing
> something from the bug report?

So far it is not explicitly forbidden, but considered bad practice. See 
e.g. http://lists.debian.org/87ehlevcrf.fsf@windlord.stanford.edu

I had to look into too many of these problems and clean up the nasty 
ones (sendmail recently, badly done /emul/ia32-linux to /usr/lib32 
transitions for squeeze)

Andreas


# dpkg --unpack /var/cache/apt/archives/glx-diversions_0.2.2_amd64.deb
# apt-get -f install
[...]
Setting up python3.2-dev (3.2.3-6) ...
WARNING: non-empty directory on upgrade: /usr/include/python3.2
total 0
drwxr-xr-x 3 root root 200 Feb 19 23:05 CXX
Setting up python3-dev (3.2.3-6) ...
Setting up python3-cxx-dev (6.2.4-2) ...
[...]

# ls -lad /usr/include/python*
drwxr-xr-x 3 root root   60 Feb 19 23:05 /usr/include/python3.2
drwxr-xr-x 2 root root   60 Feb 19 23:05 /usr/include/python3.2_d
drwxr-xr-x 2 root root 1900 Feb 19 23:06 /usr/include/python3.2mu

Congratulations, now python*-dev* is borked.



More information about the Python-modules-team mailing list