From owner-freebsd-current Wed Feb 14 7:10:17 2001 Delivered-To: freebsd-current@freebsd.org Received: from mailgate.originative.co.uk (mailgate.originative.co.uk [62.232.68.68]) by hub.freebsd.org (Postfix) with ESMTP id B1CA137B4EC; Wed, 14 Feb 2001 07:10:11 -0800 (PST) Received: from FreeBSD-Services.co.uk (lobster.originative.co.uk [62.232.68.81]) by mailgate.originative.co.uk (Postfix) with ESMTP id 415321D14A; Wed, 14 Feb 2001 15:10:09 +0000 (GMT) Message-ID: <3A8A9FD6.B91CE40E@FreeBSD-Services.co.uk> Date: Wed, 14 Feb 2001 15:10:14 +0000 From: Paul Richards X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Leif Neland Cc: Nik Clayton , "Michael C . Wu" , freebsd-current@FreeBSD.ORG Subject: Re: pkg_update References: <20010207202335.C20454@peorth.iteration.net> <20010208232645.A86390@canyon.nothing-going-on.org> <00c501c092ec$678e73a0$0e00a8c0@neland.dk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Leif Neland wrote: > > > On Wed, Feb 07, 2001 at 08:23:35PM -0600, Michael C . Wu wrote: > > > On Thu, Feb 08, 2001 at 01:56:11AM +0100, Leif Neland scribbled: > > > | It seems pkg_update is only usable when installing from packages, not from > > > | ports. > > > > > > Because it is a package update system. If you want to update > > > from the ports, use 'pkg_version -c |sh' > > > > Never, ever, *ever* do this. > > > > Just installing a new version of a port seems to work. I've actually run into some problems that are on my list of things to look at. The problem is that 'make install' in a port doesn't check dependencies properly, whereas pkg_install does. The way I currently use pkg_update (not ideal I've plans to improve it) is to build the new version and then do 'make package'. This installs the new version, over the top of any previous versions but that doesn't matter because pkg_update cleans all that up. Once 'make package' is finished you can run pkg_update using the newly created package. The problem is that the 'make install' will happily succeed but the pkg_install run via pkg_update will fail because the required dependencies for the package are missing. Of course, by the time the pkg_install fails the pkg_delete has uninstalled all your older versions. This isn't fatal because pkg_update prints out the contents of the +REQUIRES file when it fails so you can do a 'make install' to install the new port version and then copy the dependencies into /var/db/pkg/'pkgname'/+REQUIRES. I know that's not ideal but it prevents you getting totally screwed if the pkg_install fails due to dependencies. > Couldn't it be made possible to use just the update-of-dependencies part of pkg_update without doing the pkg_delete/pkg_install bit? > > Perhaps I'll try... I guess it might be useful to just print out the collated dependencies, just like it does if the pkg_install step fails. It would be pretty trivial to add a switch to add that functionality. That would allow you to get the contents of what the new +REQUIRES file would be like if all the pkg* steps were run but to not actually run them so you can do them by hand. Paul. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message