On Mon, Oct 28, 2002 at 10:31:31PM -0500, Eric van Gyzen wrote:
> The following error message from pkg_add(1) doesn't make sense [to me]:
> 
> amelia:/var/db/pkg# pkg_add -r bash
> Fetching ftp://blah/packages/Latest/mysql-client.tgz... Done.
> pkg_add: package 'mysql-client-3.23.52' or its older version already 
> installed
> amelia:/var/db/pkg# ls -d mysql-client*
> mysql-client-3.23.49
> 
> Yes, that's correct: an /OLDER/ version is installed.  I would like to 
> update to the version on the ftp server.  That's why I ran pkg_add.  Why 
> does it not update the package without the -f flag?  I realize that there 
> is now a pkg_update command, but it lacks the ability to fetch packages -- 
> and their dependencies -- remotely.
> 
> Would anyone like to explain this logic?

pkg_add will not deinstall the old package before adding the new one
(yes, this is a limitation).  If it goes ahead and installs the new
version, it will install over the top of the old one, possibly leaving
old files lying around on the filesystem and certainly screwing up the
consistency of your package database (/var/db/pkg).

At some point in the future pkg_add will hopefully gain the ability to
correctly upgrade packages; for now your best bet is to use a tool
like portupgrade (with the -P switch if you like to use packages)
which will do it for you correctly.

Kris

Attachment: msg06923/pgp00000.pgp
Description: PGP signature

Reply via email to