From owner-freebsd-questions@FreeBSD.ORG Fri Apr 18 17:59:41 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C2CC106566B for ; Fri, 18 Apr 2008 17:59:41 +0000 (UTC) (envelope-from fbsd06+VD=21055077@mlists.homeunix.com) Received: from turtle-out.mxes.net (turtle-out.mxes.net [216.86.168.191]) by mx1.freebsd.org (Postfix) with ESMTP id 0BE238FC1F for ; Fri, 18 Apr 2008 17:59:40 +0000 (UTC) (envelope-from fbsd06+VD=21055077@mlists.homeunix.com) Received: from mxout-03.mxes.net (mxout-03.mxes.net [216.86.168.178]) by turtle-in.mxes.net (Postfix) with ESMTP id EFE5216468C for ; Fri, 18 Apr 2008 13:40:01 -0400 (EDT) Received: from gumby.homeunix.com. (unknown [87.81.140.128]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTP id 7238423E3E9 for ; Fri, 18 Apr 2008 13:39:59 -0400 (EDT) Date: Fri, 18 Apr 2008 18:39:55 +0100 From: RW To: freebsd-questions@freebsd.org Message-ID: <20080418183955.2a6ac178@gumby.homeunix.com.> In-Reply-To: <200804152002.20097.fbsd.questions@rachie.is-a-geek.net> References: <200804151245.03033.lists-fbsd@shadypond.com> <4804A46B.20307@otenet.gr> <919383240804150626xe343795l84d99cfaad68435@mail.gmail.com> <200804152002.20097.fbsd.questions@rachie.is-a-geek.net> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: overnight upgrade interrupted by questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2008 17:59:41 -0000 On Tue, 15 Apr 2008 20:02:19 +0200 Mel wrote: > If you wanted to script the first case, you'd do the following in > every origin that needs updating: I have a similar script, that works globally, recursing down from each out-of-date port through any missing origins. If you call it with "-a" it runs over all installed ports - useful if you want to clear everything and start again. # cat /root/bin/portsconf #!/bin/sh IFS=" " : ${PORTSDIR:=/usr/ports} if [ "${1}x" = "-ax" ] ; then pvflags='-oq' else pvflags="-oql\<\>" fi visited_origins= recurse_origins(){ cd "${PORTSDIR}/${1}" # need to configure before recursing in case dependencies change make config-conditional for d in `make build-depends-list run-depends-list | grep -Eo "[^/]+/[^/]+$"` ;do installed=`pkg_info -qO ${d}` if [ -z "$installed" ] ;then if ! echo "$visited_origins" | grep "$d" >/dev/null ; then visited_origins="$visited_origins $d" recurse_origins $d fi fi done } for orig in `pkg_version ${pvflags} ` ; do recurse_origins $orig done