retitle 681243 dpkg: warn when different packages have same file as directory 
and symlink
merge 406715 681243
thanks

On 2012-07-11 19:07 +0200, Sven Joachim wrote:

> On 2012-07-11 18:53 +0200, Bart Martens wrote:
>
>> Package: dpkg
>> Version: 1.16.7
>>
>> The file /usr/include/tcl is a directory or a symbolic link depending on the
>> order of installation of the packages tk-tile 0.8.2-2.2 and tcl-dev 8.5.0-2.
>
> See #612264 on that topic.
>
>> This can be reproduced quite easily with these commands:
>>
>>   pbuilder --login
>>   apt-get -y install file 
>>   apt-get -y install tk-tile
>>   apt-get -y install tcl-dev
>>   file /usr/include/tcl
>>   apt-get -y --purge remove tk-tile
>>   apt-get -y --purge remove tcl-dev
>>   apt-get -y install tcl-dev
>>   apt-get -y install tk-tile
>>   file /usr/include/tcl
>>   dpkg -c /var/cache/apt/archives/tk-tile_0.8.2-2.2_amd64.deb | grep 
>> include/tcl
>>   dpkg -c /var/cache/apt/archives/tcl-dev_8.5.0-2_all.deb | grep include/tcl
>>
>> In my opinion, regardless of the order in which these two packages are
>> installed, dpkg should fail to install the second package, with an error
>> message about /usr/include/tcl.
>
> Policy (ยง6.6) actually documents this behavior:
>
>   A directory will never be replaced by a symbolic link to a
>   directory or vice versa; instead, the existing state (symlink or
>   not) will be left alone and `dpkg' will follow the symlink if
>   there is one.

And changing it would break quite a few things.  However, emitting a
warning in such situations might be reasonable, see #406715.

Cheers,
       Sven



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to