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

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

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').


	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.

(This'd cause problems if, eg, someone moved /usr/doc/foo/foo.ps.gz
from foo into foo-doc in the same release cycle they did the /usr/doc ->
/usr/share/doc transition; assuming we had a /usr/doc -> /usr/share/doc

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


Anthony Towns <aj@humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. PGP encrypted mail preferred.

 ``The thing is: trying to be too generic is EVIL. It's stupid, it 
        results in slower code, and it results in more bugs.''
                                        -- Linus Torvalds

Attachment: pgpwb5isl5GJo.pgp
Description: PGP signature

Reply to: