Date: Fri, 26 Jul 1996 23:07:05 +0200 (MET DST) From: Stefan Esser <se@zpr.uni-koeln.de> To: asami@cs.berkeley.edu (Satoshi Asami) Cc: se@zpr.uni-koeln.de, stesin@elvisti.kiev.ua, andreas@klemm.gtn.com, jhs@freebsd.org, ports@freebsd.org Subject: Re: print/gs4 Message-ID: <199607262107.XAA00493@x14.mi.uni-koeln.de> In-Reply-To: <199607242322.QAA01004@baloon.mimi.com> References: <199607241005.MAA15006@x14.mi.uni-koeln.de> <199607242322.QAA01004@baloon.mimi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Satoshi Asami writes: > * Maybe we should have some checksum (md5 ?) > * of each file installed from a port or > * package in the "+CONTENTS" file ? > * > * Before removing any file of a package, > * all the checksums could be verified, > * and a warning printed for all files that > * fail the test. This way you know which > * config file to preserve for the new > * version :) > * > * With a "force" flag to pkg_delete, all > ^^^^ > You mean "without"? :) No, I meant: 1) No flag: Delete any file from the package only if no single file failed the test. 2) With -f: Delete all files that do still match their original MD5 and complain about the rest, leaving a chance to copy them to a safe plce before the install of a new version overwrites a customized file. 3) With -F: Delete all files, no questions asked :) > * files that did match the checksum could > * be removed, with a "FORCE" flag, ALL > * files could be removed unconditionally. > > Unfortunately, this only solves part of the problem, as unchanged > "shared" files between the versions will be removed as well. We need > some kind of "registry" (full with inverted index and stuff, so we > know what file is used from what package) to let people have multiple > versions.... A simple cat /var/db/pkg/*/+CONTENTS | grep -v "^@" | sort | uniq -d generates a list of files used by more than one package. (Well, you could get more fancy then that, I just wanted to have a rough estimate of the time required to check this from the existing +CONTENTS files). It takes 0.29 real 0.21 user 0.06 sys on my 486 system with 58 packages installed ... > * And how about making the pkg_delete a > * part of the installation of the next > * version of the same port (by some means) ? > * > * This way I could just install gs-4.01 > * and need not bother for files that are > * to be deleted with no replacement. > * > * Kleening up the remains of old ports > * can be a pain, else ... > > Maybe we can add a test to pkg_add that checks if there is something > that looks like a different version of the same port, and ask the user > if s/he wants to pkg_delete it first.... Yes. I guess this is best done by having two names for each package. One long name with the version, and one "Class" name, that is valid for all the releases of that package. (It is a single ID for all packages that share the same set of executable names and config file names. The US and export versions of PGP ought to have the same "short" package name, for example.) I did never like the fact, that I had to know the exact release name for a package I was going to delete. This does always require a lookup of the full name in the /var/db/pkg directory ... It should suffice top say "pkg_delete bash" for example to remove the package "bash-1.14.6" (or was it bash-1.14-6 :-) ... Regards, STefan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607262107.XAA00493>