Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Apr 2003 11:58:08 +0700
From:      Roger Merritt <mcrogerm@stjohn.ac.th>
To:        freebsd-questions@FreeBSD.ORG
Cc:        Rob Lahaye <lahaye@users.sourceforge.net>
Subject:   Re: How to savely upgrade software from ports?
Message-ID:  <5.2.0.9.0.20030421114802.00a46200@127.0.0.1>
In-Reply-To: <3EA363F0.1020900@users.sourceforge.net>

next in thread | previous in thread | raw e-mail | index | archive | help
At 10:22 AM 4/21/03, you wrote:


>I'm having trouble how to savely upgrade software to newer version in the 
>ports.
>For example, "pkg_version -v | grep -v =" tells me:
>
>linux_base-7.1_2   <   needs updating (port has 7.1_3)
>
>
>I see two options, for this example:
>
>1) simply install 7.1_3 *without* deleting 7.1_2.
>
>2) delete with "-f" 7.1_2 and then install 7.1_3.
>    (this is what the "pkg_version -c" output suggests).
>
>Can someone tell me what are the pros and cons?
>Is there another (safer) way of upgrading?
>
>Thanks,
>Rob.

Try running 'pkg_version -c > needs.update'. Then use your favorite editor 
to read "needs.update". You will find all the shell commands necessary to 
upgrade *all* your outdated ports, including the "pkg_delete" commands to 
remove the old packages. If you want to run this as a shell script you have 
to delete the first few lines, and you can delete the entries for any ports 
you don't want to upgrade at this time.

You can run the commands individually by just typing them in or run 'sh 
./needs.update', which will upgrade all your outdated ports. It takes a 
while if you have many ports, and some require interactive input, but it's 
a good system.

If you have "portupgrade" installed you can get a picture of what needs to 
be done by running 'portversion -c > needs.update' to get a shell script 
similar to the output of 'pkg_version -c'. You can then edit the script to 
remove entries for any ports you don't want to upgrade right now, or you 
could just run the command 'portupgrade -afr' (I've been told that you need 
the 'f' option for dependencies which are *not* outdated).


-- 
Roger



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