[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#699206: dpkg: Replace and symlinks: symlink overriden when it shouldn't



Control: reassign -1 libc-bin
Control: retitle -1 ldconfig replaces native amd64 dynamic linker symlink with current dir one from foreign libc6-amd64

[ Including full mail for glibc maintainer's convenience. ]

On Tue, 2013-01-29 at 00:50:44 +0100, Kurt Roeckx wrote:
> Package: dpkg
> Version: 1.16.9
> Severity: important

> On my amd64 system I installed libc6-amd64:i386, to see how that
> behaves.
> 
> libc6:amd64 has a:
> Replaces: libc6-amd64
> 
> The file they have in common is the dynamic linker:
> /lib64/ld-linux-x86-64.so.2
> 
> It's the only file they have in common, and they really need
> to have that in common.  But obviously we want to get rid of
> libc6-amd64 so it makes sense for libc6:amd64 to replace it.
> 
> In both packages it's a symlink, but to a different file:
> libc6:amd64 has: /lib64/ld-linux-x86-64.so.2 -> /lib/x86_64-linux-gnu/ld-2.13.so
> libc6-amd64:i386 has: /lib64/ld-linux-x86-64.so.2 -> ld-2.13.so
> 
> Both point to a file in their own package.
> There is no /lib64/ld-2.13.so in libc6:amd64, only in
> libc6-amd64:i386.
> 
> When installing libc6-amd64:i386 I got:
> Unpacking libc6-amd64 (from .../libc6-amd64_2.13-37_i386.deb) ...
> Replaced by files in installed package libc6:amd64 ...
> Setting up libc6-amd64 (2.13-37) ...
> 
> However trying to remove libc6-amd64:i386 again, I got:
> Removing libc6-amd64 ...
> dpkg (subprocess): unable to execute installed post-removal script (/var/lib/dpkg/info/libc6-amd64.postrm): No such file or directory
> 
> The problem being that /lib64/ld-linux-x86-64.so.2 was a dangling
> symlink pointing to ld-2.13.so which was removed.
> 
> It looks to me like that Replace wasn't taking into account,
> and the symlink was just overwritten.
> 
> I know that symlinks have always been special, and I wonder
> if that's what causing the problems.  I didn't expect the
> symlink to be overwritten when there is a Replaces.

The Replaces are behaving correctly, and so is dpkg, as seen from
running it with -D7777. I was checking the various package maintainer
scripts involved here, as at least gcc-4.7-base:i386, libgcc1:i386
and libc6:i386 need to be installed before libc6-amd64:i386 can be
installed. Nothing there seemed overly suspicious though, but strace
revelaed that ldconfig is the culprit. You can check that by installing
the packages, restoring the dynamic linker symlink, and running ldconfig.

Thus reassigning.

Thanks,
Guillem


Reply to: