Reply
 
Thread Tools Display Modes
  #1  
Old 09-23-2011, 11:18 PM
rich4421972 rich4421972 is offline
Junior Member
 
Join Date: Aug 2011
Location: Seattle, WA
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default upgrading ports with portupgrade
There is a good reason to upgrade the installed ports on the system soon after installation in order to maintain a secure, up-to-date and powerful PC-BSD system. My favorite tool for updating ports is the method supported by portsnap and portupgrade. Portupgrade has the power to upgrade individual port files but does not install upgraded versions of the libraries and packages that those ports depend on. This can create a problem later on but there is a very agreeable fix.

If you have not done so already, start your upgrade process by downloading and extracting a current snapshot of the FreeBSD ports tree by using

portsnap fetch extract
or
portsnap fetch upgrade (if you have already used portsnap on a previous occasion)

This will download a fresh copy of the ports tree. If you already have the ports installed, portsnap will replace your old ports tree with this new snapshot. portsnap is included by default in the PC-BSD install.
after downloading the new shapshot, it is now time to determine how many, if any, of your ports need to be upgraded. Use the tool, portaudit to reveal this information.
portaudit
(portaudit is included in the ports tree under /usr/ports/ports-mgmt/portaudit) Use make install clean to get it installed. Then you can use:

portaudit -a

to determine how many of your installed ports could be upgraded and what each port depends on. You can audit individual ports just as easily by usin portaudit [options] pkgname. It is likely that portaudit will reveal some stale dependencies within your list of installed ports. Stale dependencies are program and libraries that are needed by the new, upgraded versions of the ports. If a dependency does not get upgraded with port that needs it, it is called "stale." If this happens, use

pkgdb -F

to fix all of the dependency issues caused by using the new ports tree to upgrade. Once pkgdb clears all dependency issues, you are now ready to use portupgrade for the upgrade of some or all of your ports. Portugrade comes with a number of very helpful options. To upgrade a single, specific port, use

portupgrade [options] pkgname

If you wish to upgrade all ports on the system use:

portupgrade -ia

which will upgrade all ports while confirming the configuration settings for each port as it is being upgraded. This does take a while, but it grants a great deal of control over the update process and if you are upgrading only a few ports, this could be a great choice.

Run:

pkgdb -F

again to make sure there are no stale dependencies or problems after the upgrade. Once all stale dependencies have been fixed, you have successfully completed the process of upgrading your ports.
Reply With Quote
  #2  
Old 09-25-2011, 08:24 AM
Smorkster Smorkster is offline
Junior Member
 
Join Date: Aug 2011
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Looks like a good guide.
Haven't used it yet, but from just the text it looks like something very useful
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:53 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Copyright 2005-2010, The PC-BSD Project. PC-BSD and the PC-BSD logo are registered trademarks of iXsystems.
All other content is freely available for sharing under the terms of the Creative Commons Attribution License.