View Single Post
  #6   (View Single Post)  
Old 1st March 2011
classicmanpro's Avatar
classicmanpro classicmanpro is offline
Real Name: Turea Alexandru Teodor
Fdisk Soldier
 
Join Date: Oct 2010
Location: Sinaia, Romania
Posts: 51
Post

Here's a nifty trick:

Code:
pkg_add -uuv firefox >& /tmp/update.log
NOTE #1: The >& notation (CSH shell) redirects all the output (stdout and stderr) to a log file so you can analyze the update later.

NOTE #2: There are times (it's very rare) when pkg_add updates all the dependencies but gives an error when updating the leafs (the last packages, like level 1 or 2 leafs). In case it happens, run the command again, it's harmless.

PS: I've made a PHP script this weekend which uses the output from 'pkgdepgraph -o' to create a shell script with one-line calls to pkg_add for each installed package but ordered form the core dependencies (like perl and pcre) to the leafs (like firefox and xfce) so that I don't have any update issues. When it's fully tested I'll release it ... I don't know who invented regular expressions but he (or she) should get a monument.
__________________
A daemon in need is a daemon indeed.
Reply With Quote