Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Feb 2001 15:10:14 +0000
From:      Paul Richards <paul@FreeBSD-Services.co.uk>
To:        Leif Neland <leif@neland.dk>
Cc:        Nik Clayton <nik@FreeBSD.ORG>, "Michael C . Wu" <keichii@peorth.iteration.net>, freebsd-current@FreeBSD.ORG
Subject:   Re: pkg_update
Message-ID:  <3A8A9FD6.B91CE40E@FreeBSD-Services.co.uk>
References:  <Pine.BSF.4.21.0102080152030.58657-100000@arnold.neland.dk> <20010207202335.C20454@peorth.iteration.net> <20010208232645.A86390@canyon.nothing-going-on.org> <00c501c092ec$678e73a0$0e00a8c0@neland.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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