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

Re: Bug#2828: [PATCH] check dev/inode before removing old files on upgrade



On Mon, Oct 11, 1999 at 01:54:39PM +1000, Anthony Towns wrote:
> On Sun, Oct 10, 1999 at 10:12:24PM -0400, Ben Collins 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. If there is a match, dpkg leaves it alone since they are the
> > same file. This is further sped up by only having to stat the new files once
> > on the first loop, so for more than one old file, there is not much performance
> > loss (barely measurable using `time').
> 
> Consider:
> 
> 	a_1.deb contains /usr/bin/X11/xa
> 	a-mod_1.deb conflicts,replaces: a, and contains /usr/X11R6/bin/xa
> 
> Installing a-mod_1 over a_1 results in /usr/X11R6/bin/xa disappearing.
> 
> This doesn't look at all easy to fix, and it's probably not too important
> in any case, but it's probably worth noting in the `sanity' comment.

Yeah, the "insanity" would be stating every file on the system for each package
upgrade :) I'm not sure, there may be a way to keep a *namenode list of the
replaced files and check those too.

> You might also like to include a debug(dbg_eachfile, "...") comment of
> some sort, too.

Yeah, it's an easy addition.

Ben


Reply to: