From owner-freebsd-questions Wed Jun 26 11:45:43 2002 Delivered-To: freebsd-questions@freebsd.org Received: from chivas.oneill.dhs.org (chivas.oneill.dhs.org [65.65.85.161]) by hub.freebsd.org (Postfix) with ESMTP id 58F6E37B80C for ; Wed, 26 Jun 2002 11:31:42 -0700 (PDT) Received: from v812r.seanoneill.info (dhcp1.NONROUTABLE [192.168.2.1]) by chivas.oneill.dhs.org (Postfix) with ESMTP id 5429C767D; Wed, 26 Jun 2002 13:31:37 -0500 (CDT) Message-Id: <5.1.0.14.0.20020626132323.00aee270@postoffice.swbell.net> X-Sender: swoneill@postoffice.swbell.net X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Wed, 26 Jun 2002 13:31:36 -0500 To: David Wilk , Darren Pilgrim From: Sean O'Neill Subject: Re: Updating my ports tree? Cc: FreeBSD-Questions In-Reply-To: <20020626121013.C10404@cygnus.wks.Gallup.cia-g.com> References: <3D19267F.8A2FCFE5@pantherdragon.org> <3D19267F.8A2FCFE5@pantherdragon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Be careful using portupgrade for EVERYTHING. Upgrading things can at times mess up your old configuration settings. If you update everything at once, it tough to figure out what's not working immediately assuming you have lots of stuff installed - like me. This is a script I wrote that somewhat helps me manage my machine and the ports installation. I usually use the "port-upgrade" option and walk through the ports I think are important first. Once I have everything important individually upgraded and verified as working. I actually rarely using the allport-upgrade switch with this script anymore. #!/usr/local/bin/ksh KERNEL="COMPAQ-tuned" CVSUPFILE="/usr/cvs-supfile" case "$1" in 'buildworld') cd /usr/src make clean make buildworld ;; 'installworld') cd /usr/src make installworld ;; 'buildkernel') if [ ! -z "${2}" ]; then KERNEL=${2} fi cd /usr/src make buildkernel KERNCONF=${KERNEL} ;; 'installkernel') if [ ! -z "${2}" ]; then KERNEL=${2} fi cd /usr/src make installkernel KERNCONF=${KERNEL} ;; 'update') cd /usr/src echo "Updating source in /usr/src ..." make update ;; # rebuild-pkdb was added specifically for the following which indicates the # pkgdb.db file is corrupt: # /usr/local/lib/ruby/site_ruby/1.6/pkgdb.rb:243:in `each_key': tried to allocate too big memory (NoMemoryError) 'rebuild-pkgdb') pkgdb -fu ;; 'ports-workclean') for portdir in $(find . -type d -name work -print) do cd ${portdir} cd .. make clean done ;; 'portdb-clean') /usr/local/sbin/pkgdb -F ;; 'allport-upgrade') echo "NOTE: Did you run allport-chk first and you are sure you want to do this?" sleep 5 echo "Updating ports using portupgrade ..." /usr/local/sbin/portupgrade -ra ;; 'port-upgrade') if [ ! -z "${2}" ]; then PORT=${2} else echo "ERROR: You must specify a port to upgrade you dork !!!" exit 1 fi echo "NOTE: Did you run allport-chk first and you are sure you want to do this?" sleep 5 echo "Updating ${PORT} using portupgrade ..." /usr/local/sbin/portupgrade -r ${PORT} ;; 'allport-chk') echo "NOTE: This assumes the ports tree has been updated recently." echo "Checking ports needing to be upgraded ..." pkg_version -L = ;; *) echo "Usage: ${0}