DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD Ports and Packages

FreeBSD Ports and Packages Installation and upgrading of ports and packages on FreeBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 26th February 2015
jb_daefo jb_daefo is offline
Spam Deminer
 
Join Date: May 2008
Posts: 303
Default FreeBSD v10 pkg upgrade with pipe example -- works good

Saves a lot of time vs ports.
Code:
script weekly_thu_upgrade pkg upgrade
One answers "n" , result is a file
Code:
grep p5 weekly_thu_upgrade | sed 's/:/ /g' | awk '{print $1}' |  grep -v mous | xargs -J % pkg install %
One greps out ports that pull in unwanted dependencies to build manually.
A second run with "pkg install -y" actually does the command, as the pipe in the code example is non-interactive and assumes NO.

Many more aspects to this weekly upgrade and a few unmentioned steps (editing out extra lines from the first file result in the first code block above etc) but may be useful to some readers of this post or thread.
Sorry no time to include more useful information.
A few suggestions here to make pkg more robust but not the venue...

edit:
the grep can be changed to//replaced with a "head -10 " "head -30" "head -50" sequence also...
__________________
FreeBSD 13-STABLE

Last edited by jb_daefo; 26th February 2015 at 03:14 PM. Reason: grep > sed possible.
Reply With Quote
Reply

Tags
pkg v10 v11

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
FreeBSD 9.2 RC3 works on iMac but... lumiwa FreeBSD Installation and Upgrading 5 20th September 2013 11:28 AM
is it a good security practice to always pkg_add -u after an upgrade ? daemonfowl OpenBSD Security 3 17th September 2012 02:01 AM
Enhanced Speedstep only works for two CPU cores on FreeBSD 7.1 Android1 FreeBSD General 13 19th April 2009 08:59 PM
Skype on FreeBSD 7.1 - works very slow.. DNAeon FreeBSD General 2 27th January 2009 11:48 AM
Good books for freebsd? Johnny2Bad FreeBSD General 3 26th May 2008 03:42 PM


All times are GMT. The time now is 09:35 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick