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

Re: Bug#322762: no blocking bugs anymore



What's going on is that a base sarge system looks like this:

kodama:/usr/doc# ls -l
total 0
lrwxrwxrwx  1 root root 15 Jan  5 22:41 at -> ../share/doc/at
lrwxrwxrwx  1 root root 17 Jan  5 22:41 cpio -> ../share/doc/cpio
lrwxrwxrwx  1 root root 21 Jan  5 22:41 ipchains -> ../share/doc/ipchains
lrwxrwxrwx  1 root root 18 Jan  5 22:41 klogd -> ../share/doc/klogd
lrwxrwxrwx  1 root root 25 Jan  5 22:41 liblockfile1 -> ../share/doc/liblockfile1
lrwxrwxrwx  1 root root 21 Jan  5 22:41 sysklogd -> ../share/doc/sysklogd
kodama:/usr/doc# dpkg -S /usr/doc
base-files: /usr/doc

When this is upgraded to etch, base-files is upgraded before most of these
symlink containing packages. So dpkg cannot remove the /usr/doc directory
despite that being the last package to own it. The symlinks are eventually
removed, but the directory remains.

(Reading database ... 7749 files and directories currently installed.)
Preparing to replace base-files 3.1.2 (using .../archives/base-files_4_i386.deb) ...
Unpacking replacement base-files ... dpkg: warning - unable to delete old file `/usr/doc': Directory not empty
Setting up base-files (4) ...


BTW, there are also crufty old systems where /usr/doc contains a mess of
broken symlinks due to broken old packages that were removed before being
fixed, or possibly due to upgrade bugs in existing packages that we've missed:

<Sesse> joeyh: heh. I actually have tons of stuff left in /usr/doc; most of it from 1998, though. :-)
<Sesse> six symlinks, though. probably left over in some upgrade...
<Sesse> joeyh: well... tftpd-hpa, raidtools2, python, freefont, fai, dhcp, at
<Sesse> all but python and freefont are simply gone


The following in base-files's postinst would fix both issues.

if [ -d /usr/doc ] && [ ! -L /usr/doc ]; then
	find /usr/doc -maxdepth 1 -mindepth 1 -type l -print0 | xargs -0 rm -f
	rmdir --ignore-fail-on-non-empty /usr/doc 2>/dev/null
fi

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature


Reply to: