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

Bug#189854: I still have /usr/doc/libc6 and /usr/doc/libc6-dev ..



Hi,

At Sun, 20 Apr 2003 11:40:50 -0400,
Joey Hess wrote:
> My laptop, which was installed from stable last summer and upgraded to
> unstable, has /usr/doc/libc6 and /usr/doc/libc6-dev symlinks. I see no
> code in the postinsts or preinsts that could be responsible for this.
> My server, installed this spring from stable and immediatly upgraded to
> unstable, has the same thing.
> 
> I suspect that the old libc6 and libc6-dev packages had code to make the
> symlinks in their postinst, but lacked the code in their postrm to
> remove that link on upgrade. So when it is upgraded to the version that
> "completed" the transition, the links never get removed.
> 
> That code in the prerm typically looked like this, as inserted by debhelper
> into thousands of packages:
> 
> if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/package ]; then
>         rm -f /usr/doc/package
> fi
> 
> I looked at the prerm of libc6 in my woody chroot, and found this code:
> 
> if [ "$1" = remove ]; then
>     if [ -d /usr/doc ]; then
>         package=`basename $0 .prerm`
>         if [ -L /usr/doc/$package ]; then
>             rm /usr/doc/$package ;
>         fi
>     fi
> fi
> 
> The problem here is that you only do it on remove, and do not remove it on
> upgrade.
> 
> I suggest that you add a rm /usr/doc/$package to your postinst scripts
> to delete the old dead links.

It seems that this problem exists in almost glibc packages; libc6,
libc6-dev, libc6-pic, libc6-dbg, libc6-prof, locales, nscd,
glibc-doc...

I decided to add that code to prerm in all glibc derived packages, is
it ok?

Regards,
-- gotom



Reply to: