On Wed, Jul 11, 2012 at 07:18:43PM +0000, Bart Martens wrote:
> On Wed, Jul 11, 2012 at 07:07:49PM +0200, Sven Joachim wrote:
> > On 2012-07-11 18:53 +0200, Bart Martens wrote:
> > > 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
> 
> OK.
> 
> >   and `dpkg' will follow the symlink if there is one.
> 
> I'm not convinced that this is a good choice.  Do you know where this choice
> comes from ?

Please have a look at this scenario :

  apt-get -y -t stable install tcl-dev
  apt-get -y -t stable install tk-tile
  apt-get -y -t unstable install tcl-dev

The first and second commands succeed.  The third command fails with this :

  Unpacking replacement tcl-dev ...
  dpkg: error processing /var/cache/apt/archives/tcl-dev_8.5.0-2_all.deb 
(--unpack):
   trying to overwrite '/usr/include/tcl', which is also in package tk-tile 
0.8.2-2.1
  Preparing to replace tcl 8.4.16-2 (using .../archives/tcl_8.5.0-2_all.deb) ...
  update-alternatives: using /usr/bin/tclsh8.4 to provide /usr/bin/tclsh 
(tclsh) in auto mode
  Unpacking replacement tcl ...
  Errors were encountered while processing:
   /var/cache/apt/archives/tcl-dev_8.5.0-2_all.deb
  E: Sub-process /usr/bin/dpkg returned an error code (1)

So dpkg has initially installed /usr/include/tcl as a symbolic link, next dpkg
has tolerated the installation of tk-tile owning /usr/include/tcl as a
directory, and finally dpkg fails to upgrade the symbolic link because tk-tile
owns /usr/include/tcl as a directory.

Obviously dpkg should successfully upgrade the symbolic link.

The solution is, in my opinion, that dpkg fails to install the package owning
/usr/include/tcl as a directory when /usr/include/tcl is already installed as a
symbolic link.  Then there is no problem with upgrading the symbolic link.

But I'm still interested to know more about "changing it would break quite a
few things", see earlier on the bug report.

Regards,

Bart Martens



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

Reply via email to