From owner-freebsd-questions@FreeBSD.ORG Tue Apr 15 20:46:27 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 5F3EA1065670 for ; Tue, 15 Apr 2008 20:46:27 +0000 (UTC) (envelope-from cwhiteh@onetel.com) Received: from raq5.nitrex.net (raq5.nitrex.net [213.165.227.5]) by mx1.freebsd.org (Postfix) with ESMTP id E9DB28FC21 for ; Tue, 15 Apr 2008 20:46:26 +0000 (UTC) (envelope-from cwhiteh@onetel.com) Received: from [192.168.10.100] (gate.zenatode.org.uk [213.165.225.167]) by raq5.nitrex.net (8.13.1/8.13.1) with ESMTP id m3FKAd5J018494 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 15 Apr 2008 21:10:43 +0100 Message-ID: <48050BC1.1050305@onetel.com> Date: Tue, 15 Apr 2008 21:10:41 +0100 From: Chris Whitehouse User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 CC: User Questions References: <200804151245.03033.lists-fbsd@shadypond.com> <4804A46B.20307@otenet.gr> <919383240804150626xe343795l84d99cfaad68435@mail.gmail.com> <200804152002.20097.fbsd.questions@rachie.is-a-geek.net> In-Reply-To: <200804152002.20097.fbsd.questions@rachie.is-a-geek.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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: Tue, 15 Apr 2008 20:46:27 -0000 Mel wrote: > On Tuesday 15 April 2008 15:26:42 Edward Ruggeri wrote: >> A lot of people would reply that they'd like to configure the ports >> themselves before launching the installation, leading people to >> suggest scripts such as: >> >> #!/bin/sh >> plist=`pkg_version -ovl'<' |awk '{ print $1 }'` >> for porg in $plist ; do >> cd /usr/ports/${porg} && make config-recursive >> done > > Sorry to disappoint you, but that wont work for two reasons: > 1) make config-recursive is flawed by design, because it makes a dependency > list based on current settings and if you alter dependencies during your > recursive configuring, it will not update the list. > > 2) If you hit an interactive configure (not config, configure) target, then > you will still end up with a dialog. Prime example: print/ghostscript-gpl. > > If you wanted to script the first case, you'd do the following in every origin > that needs updating: > #!/bin/sh > > VISITED= > > config_port() { > local ldeps rdeps bdeps > ldeps=`make -V LIB_DEPENDS` > rdeps=`make -V RUN_DEPENDS` > bdeps=`make -V BUILD_DEPENDS` > > make config-conditional > for dep in ${ldeps} ${rdeps} ${bdeps}; do > dir=${dep##*:} > case ${VISITED} in > *" ${dir}"*) > ;; > *) > echo "---> $dir" > VISITED="${VISITED} ${dir}" > cd ${dir} > config_port > esac > done > } > > config_port > This process has always worked for me upgrading a fairly standard desktop machine: Get a list of status of installed ports portmanager -s > somelist Extract list of category/port needing updating, with vi, whatever Do something like [sorry not exact syntax as I don't have access to a freebsd machine]: foreach i (`cat portlist`) foreach? cd /usr/ports/$i && make config foreach? end I've never installed print/ghostscript-gpl so I don't know if my method would break with it, but I do have to obviously treat java/jdk15 specially. Chris