Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Oct 2002 20:34:44 -0800
From:      Kris Kennaway <kris@obsecurity.org>
To:        Eric van Gyzen <vangyzen@stat.duke.edu>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: pkg_add(1) logic
Message-ID:  <20021029043444.GA72618@xor.obsecurity.org>
In-Reply-To: <200210282231.31186.vangyzen@stat.duke.edu>
References:  <200210282231.31186.vangyzen@stat.duke.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

--+HP7ph2BbKc20aGI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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]:
>=20
> 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=20
> installed
> amelia:/var/db/pkg# ls -d mysql-client*
> mysql-client-3.23.49
>=20
> Yes, that's correct: an /OLDER/ version is installed.  I would like to=20
> update to the version on the ftp server.  That's why I ran pkg_add.  Why=
=20
> does it not update the package without the -f flag?  I realize that there=
=20
> is now a pkg_update command, but it lacks the ability to fetch packages -=
-=20
> and their dependencies -- remotely.
>=20
> 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

--+HP7ph2BbKc20aGI
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE9vg/jWry0BWjoQKURAlrXAJ0QGQ7VFdhg+GiakqvlQVBRTJ07MgCgirbt
NthqYiHB0sHGt8M//XrmZEo=
=R34g
-----END PGP SIGNATURE-----

--+HP7ph2BbKc20aGI--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021029043444.GA72618>