From owner-freebsd-questions@FreeBSD.ORG Sat Oct 2 13:51:56 2010 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 3A7EB1065670 for ; Sat, 2 Oct 2010 13:51:56 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email1.allantgroup.com (email1.emsphone.com [199.67.51.115]) by mx1.freebsd.org (Postfix) with ESMTP id 051948FC18 for ; Sat, 2 Oct 2010 13:51:54 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email1.allantgroup.com (8.14.0/8.14.0) with ESMTP id o92DprjM087390 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 2 Oct 2010 08:51:53 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.4/8.14.4) with ESMTP id o92Dpq4G058879 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 2 Oct 2010 08:51:52 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.4/8.14.4/Submit) id o92DpqOK058878; Sat, 2 Oct 2010 08:51:52 -0500 (CDT) (envelope-from dan) Date: Sat, 2 Oct 2010 08:51:52 -0500 From: Dan Nelson To: Thomas Mueller Message-ID: <20101002135151.GH40148@dan.emsphone.com> References: <4ca708f4.svuMWmkOCHSjxBDf%mueller6727@bellsouth.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ca708f4.svuMWmkOCHSjxBDf%mueller6727@bellsouth.net> X-OS: FreeBSD 8.1-STABLE User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.96 at email1.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (email1.allantgroup.com [199.67.51.78]); Sat, 02 Oct 2010 08:51:53 -0500 (CDT) X-Scanned-By: MIMEDefang 2.45 Cc: freebsd-questions@freebsd.org Subject: Re: Massive portupgrade without being interrupted by configuration screens? 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: Sat, 02 Oct 2010 13:51:56 -0000 In the last episode (Oct 02), Thomas Mueller said: > How can one do a massive portupgrade, as with -r or -R, without being > interrupted by options configuration screens for many individual ports? > Idea is to let it run unattended such as when I might run it starting just > before bedtime. Doing "make config" ahead of time also gives the chance > to recover from a typo at the configuration screen (high risk). > > Best thing I can think of is, using multimedia/ffmpeg as an example, is > doing a dry run > > portupgrade -Rn multimedia/ffmpeg |& tee -a wouldbe.log > > This would show what other packages would need to be portupgraded and > avoid reconfiguring up-to-date dependencies. Then I would go to each of > those directories in the ports tree and run "make config". > > Running "make config-recursive" in /usr/ports/multimedia/ffmpeg would > produce configuration screens for all dependencies, including those that > are up-to-date. config-recursive does a "config-conditional" for each dependency. It should only up a config dialog for an installed up-to-date port if the port maintainer has added OPTIONS lines without bumping the portversion. That should be a rare occurance. > I tried > > portupgrade -RCn multimedia/ffmpeg |& tee -a wouldbe.log The -c flag is what you really wanted, I think. -C reconfigures every port, while -c calls "make config-conditional". > but then I got all dependency configuration screens, including those that > were up-to-date, and also the interface didn't work right: I got garbage > when trying to respond; it didn't write to the configuration screen but > produced non-color garbage to the background. Probably because you tee'd the output, so all the child processes see is a pipe on stdout (and apps usually only try to do color and cursor positioning on ttys). With -n you're not building anything anyway, so there's really no need to log the output. Just run it without the tee, then run your regular portupgrade later with tee. Instead of using tee, I use /usr/bin/script, which gives child processes a real tty to interact with, so full-screen apps work correctly. -- Dan Nelson dnelson@allantgroup.com