Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Apr 2001 15:12:11 -0500
From:      Mike Meyer <mwm@mired.org>
To:        Odhiambo Washington <wash@wananchi.com>, Nate Puri <natepuri@yahoo.com>
Cc:        questions@freebsd.org
Subject:   Re: How to people easily update ports with dependencies (such as galeon)?
Message-ID:  <15069.62747.381019.993262@guru.mired.org>
In-Reply-To: <96092713@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help
Odhiambo Washington <wash@wananchi.com> types:
> Since you've come up with this, lemme give my own view on it. I realized th=
> at other than a
> direct dependancy that you can point (i.e. by going into /usr/ports/www/gal=
> eon and doing
> 'make all-depends-list), you'll also find that there are cross dependancies=
>  - that other
> than galeon depending on glib, other ports might also depend on it too. My =
> way of doing this
> has been to 'feel nothing' and just update (via make install) and let new v=
> ersions of
> dependancies install and I've always assumed that by letting things install=
>  on the default
> location, they will always (overwrite???) the old files and as long as noth=
> ing breaks, I
> still feel nothing ;-)=20

The only problem with this is that you may leave files from the old
port around that weren't in the new one. Just a waste of disk space,
unless those files are man pages or commands - in which case you may
have out of date documentation or commands. Doing a "pkg_delete -f
<oldpackagename>" before doing the install cleans all that up for you.

Nate Puri <natepuri@yahoo.com> types:
> Simple,
> 
> do this...
> 
> pkg_version -c > update_ports.sh
> 
> Then go in update_ports.sh and you will see a list up
> ports that need to be updated (and their dependencies
> will be in there too).  Delete the top few lines, add
> '#!/bin/sh'; do chmod 755 update_ports.sh, then do
> ./update_ports.sh, and 
> viola!, updated ports.

pkg_version -c outputs a script that updates all the ports, and does
the pkg_delete -f I recommend above. It's also a bit more careful,
making sure the new port will build before it deletes the old version
and installs the new one.

You can skip adding the "#!/bin/sh" and the chmod; just do "sh
./update_ports.sh", and it'll work.

Finally, the *reason* those first few lines are there is because the
author of pkg_version knows that blindly executing the output can
break things, and wants you to look at the script before you run
it. If you run the script without looking at it and break something,
you've got no one to blame but yourself.

	<mike

> Later,
> Nate
> --- Philip Hallstrom <philip@adhesivemedia.com> wrote:
> > Hi all -
> > 	I was wondering if anyone had any suggestions on a
> > painless way to
> > update a port that has dependencies?
> > 
> > In my case, I currently have galeon-0.10.2 which
> > requires glib-1.2.10.  I
> > currently have glib-1.2.8.  The problem is I can
> > remove my galeon port,
> > and install the new one, but installing the new one
> > will install the new
> > version of glib without removing the old one.
> > 
> > is there an easy way to tell it to remove any old
> > ports of new versions
> > it's installing?
> > 
> > thanks!
> > 
> > -philip
> > 
> > 
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-questions" in the body of
> > the message
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

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?15069.62747.381019.993262>