Bug#2828: [PATCH] check dev/inode before removing old files on upgrade
On Mon, Oct 11, 1999 at 04:24:00AM +0200, Wichert Akkerman wrote:
> Previously sparc porters wrote:
> > The work around is for dpkg to check each file it removes on upgrading the
> > package against the files in the new version, by stat'ing them and comparing
> > dev/inode.
> Should you be using lstat here?
Yes, because when dpkg replaces existing files, it doesn't follow symlinks. It
always replaces the destination with the new file/symlink. A file being removed
is also not followed, the actual symlink is removed. Just think of symlinks in
the /usr/doc directory being the same as the symlink in the (linked)