From owner-freebsd-questions@FreeBSD.ORG Sat Mar 4 20:47:33 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0FE4816A4BF for ; Sat, 4 Mar 2006 20:47:32 +0000 (GMT) (envelope-from kstewart@owt.com) Received: from smtp.owt.com (smtp.owt.com [204.118.6.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 84D0A43D45 for ; Sat, 4 Mar 2006 20:47:32 +0000 (GMT) (envelope-from kstewart@owt.com) Received: from topaz-out (owt-207-41-94-233.owt.com [207.41.94.233]) by smtp.owt.com (8.12.8/8.12.8) with ESMTP id k24KlHbd014634; Sat, 4 Mar 2006 12:47:18 -0800 From: Kent Stewart To: freebsd-questions@freebsd.org, Luke Dean Date: Sat, 4 Mar 2006 12:47:30 -0800 User-Agent: KMail/1.9.1 References: <20060304110458.H84522@border.crystalsphere.multiverse> In-Reply-To: <20060304110458.H84522@border.crystalsphere.multiverse> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200603041247.30734.kstewart@owt.com> Cc: Subject: Re: Determining proper order to upgrade 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, 04 Mar 2006 20:47:33 -0000 On Saturday 04 March 2006 11:20, Luke Dean wrote: > I'm one of those masochists who insists on manually building all my > pakages from the ports collection without using automating software > like portmanager. > > Typically I upgrade my ports collection with > cvsup -g -L 2 /etc/supfile-that-I-made-for-ports > then run > pkg_version -v -L '=' > to get a list of what I need to upgrade. > > Then I > pkg_info -o name-of-each-port > to find out where the port lives in the ports collection, go there, > and then use "make" with whatever custom options I need to upgrade > it. > > The trouble I have is when one or more of those low-level ports that > everything else depends on gets upgraded. I can spend DAYS building > and rebuilding ports until everything gets built with the most > current dependencies. > I'm familiar with the "-r" and "-R" switches for "pkg_info", and they > are a huge help in this situation, but I'm wondering if anybody has > written a script that will take a list of packages to be upgraded, > examine their dependencies and what depends on them, and then return > a sorted list of every installed package that should be rebuilt in > order to keep the dependencies current. > > I don't want something to automate the whole process - just something > to help me out with determining which ports are affected and what > order they should be rebuilt in. > > Some of those port management packages must have something like this > internally. I guess I could go look there. > _______________________________________________ I like aliases but they don't work for this. So, I have a shell script that does the work for me. I called it pkgreq and it looks like #! /bin/sh cd /var/db/pkg pkg_info -R "$1*" | more You "pkgreq port-name-of-interest" and it returns that ports that use the port. Kent -- Kent Stewart Richland, WA http://www.soyandina.com/ "I am Andean project". http://users.owt.com/kstewart/index.html