Ben Gertzfield wrote: > If I remember, dpkg does not like replacing a directory with a > symlink. This may or may not still be the case.
Ugh, you're right: [EMAIL PROTECTED]:/tmp/scratch>dpkg --contents foo.deb drwxrwxr-x joey/joey 0 1999-07-16 14:11 ./ drwxr-xr-x joey/joey 0 1999-07-16 14:11 foo/ drwxr-xr-x joey/joey 0 1999-07-16 14:11 foo/bar/ drwxr-xr-x joey/joey 0 1999-07-16 14:11 foo/bar/baz/ [EMAIL PROTECTED]:/tmp/scratch>dpkg --contents foo-new.deb drwxrwxr-x joey/joey 0 1999-07-16 14:12 ./ drwxr-xr-x joey/joey 0 1999-07-16 14:12 foo/ drwxr-xr-x joey/joey 0 1999-07-16 14:12 foo/bar/ lrwxrwxrwx joey/joey 0 1999-07-16 14:12 foo/bar/baz -> /etc/ [EMAIL PROTECTED]:/tmp/scratch>su Password: Sorry, try again. Password: [EMAIL PROTECTED]:/tmp/scratch>dpkg -i foo.deb Selecting previously deselected package foo. (Reading database ... 31894 files and directories currently installed.) Unpacking foo (from foo.deb) ... Setting up foo (1.2.83) ... [EMAIL PROTECTED]:/tmp/scratch>dpkg -i foo-new.deb (Reading database ... 31897 files and directories currently installed.) Preparing to replace foo 1.2.83 (using foo-new.deb) ... Unpacking replacement foo ... Setting up foo (1.2.83) ... [EMAIL PROTECTED]:/tmp/scratch>ls -l /foo/bar total 3 drwxr-xr-x 3 joey joey 1024 Jul 16 14:12 ./ drwxr-xr-x 3 joey joey 1024 Jul 16 14:12 ../ drwxr-xr-x 2 joey joey 1024 Jul 16 14:11 baz/ I still think this is a good proposal -- if we could only fix dpkg to deal with this better. Aha! [EMAIL PROTECTED]:/tmp/scratch>dpkg -i foo.deb Selecting previously deselected package foo. (Reading database ... 31894 files and directories currently installed.) Unpacking foo (from foo.deb) ... Setting up foo (1.2.83) ... [EMAIL PROTECTED]:/tmp/scratch>ls -l /foo/bar total 1 drwxr-xr-x 2 joey joey 1024 Jul 16 14:11 baz/ [EMAIL PROTECTED]:/tmp/scratch>dpkg -i foo-newest.deb (Reading database ... 31897 files and directories currently installed.) Preparing to replace foo 1.2.83 (using foo-newest.deb) ... Unpacking replacement foo ... Setting up foo (1.2.83) ... [EMAIL PROTECTED]:/tmp/scratch>ls -l /foo/bar total 0 lrwxrwxrwx 1 joey joey 5 Jul 16 14:16 baz -> /etc// What I did here is a preinst that rmdir'd /foo/bar/baz. And that works around the problem. I also tried it with files in the directory, if the preinst rm -rf's the directory it works ok. -- see shy jo