Date: Wed, 26 Jun 2002 13:31:36 -0500 From: Sean O'Neill <sean@seanoneill.info> To: David Wilk <admin@cia-g.com>, Darren Pilgrim <dmp@pantherdragon.org> Cc: FreeBSD-Questions <freebsd-questions@freebsd.org> Subject: Re: Updating my ports tree? Message-ID: <5.1.0.14.0.20020626132323.00aee270@postoffice.swbell.net> In-Reply-To: <20020626121013.C10404@cygnus.wks.Gallup.cia-g.com> References: <3D19267F.8A2FCFE5@pantherdragon.org> <NGBBLCIHCLNJAIGIFFHJAEFPCGAA.aburke@nullplusone.com> <3D19267F.8A2FCFE5@pantherdragon.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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} <option - see below> [ KERNELNAME (e.g. GENERIC) ]" echo " Only buildkernel and installkernel utilize the KERNELNAME option." echo " If not specified, KERNELNAME defaults to 'compaq-tuned'." echo echo " buildworld - rebuilds everthing except kernel stuff" echo " installworld - installs everthing except kernel stuff" echo " buildkernel - rebuilds kernel as specified by KERNELNAME" echo " installkernel - installs kernel as specified by KERNELNAME" echo " update - updates ALL sources (src, ports, doc)" echo " rebuild-pkgdb - rebuilds the /var/pkg/db/pkgdb.db file" echo " ports-workclean - cleans out work dirs and distfiles for" echo " ALL ports" echo " portdb-clean - Clean up the pkg database" echo " allport-upgrade - updates ports needing to be upgraded. Run allport-chk first." echo " port-upgrade <PORTNAME> - updates individual port needing to be upgraded. Run allport-chk first." echo " allport-chk - checks ports needing upgrades" ;; esac At 12:10 PM 6/26/2002 -0600, David Wilk wrote: >Darren, > >I'm about to start the same process, and being new to FreeBSD, was wondering >what you did and how it worked out for you. > >thanks, >Dave > > > >On Tue, Jun 25, 2002 at 07:27:11PM -0700 or thereabouts, Darren Pilgrim wrote: > > Aaron Burke wrote: > > > > > > > -----Original Message----- > > > > From: owner-freebsd-questions@FreeBSD.ORG > > > > [mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Darren Pilgrim > > > > Sent: Tuesday, June 25, 2002 06:16 PM > > > > To: freebsd-questions@FreeBSD.ORG > > > > Subject: Updating my ports tree? > > > > > > > > > > > > I have a 4.5-R machine for which I'd like to update my ports tree. > > > > I really just want the current openssh-portable port, but I figure I > > > > might as well update the whole tree while I'm at it. Do I need to > > > > fetch the tree for -stable, or do I just fetch it from the default in > > > > the example supfile (which is .)? > > > > > > They are not the same supfiles. Also the ports are constantly changing. > > > I use the supfile from /usr/share/examples/cvsup/ports-supfile. The only > > > thing that needs changing is the cvsup server. I also copied this file > > > to /root. Just make the changes and run > > > "cvsup -g -L 2 /root/ports-supfile" to get the new ports installed. > > > > Thanks for your reply, but I managed to get it to work before anyone > > replied. Right now I'm installing portupgrade and will be upgrading > > all the installed ports. > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-questions" in the body of the message > >-- >******************************* >David Wilk >System Administrator >Community Internet Access, Inc. >admin@cia-g.com > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-questions" in the body of the message -- ........................................................ ......... ..- -. .. -..- .-. ..- .-.. . ... ............ .-- .. -. -... .-.. --- .-- ... -.. .-. --- --- .-.. ... Sean O'Neill To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.1.0.14.0.20020626132323.00aee270>