From owner-freebsd-questions@FreeBSD.ORG Sun Apr 20 21:58:26 2003 Return-Path: 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 94DA937B401 for ; Sun, 20 Apr 2003 21:58:26 -0700 (PDT) Received: from stjohn.stjohn.ac.th (stjohn.stjohn.ac.th [202.21.144.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id E794C43FDF for ; Sun, 20 Apr 2003 21:58:14 -0700 (PDT) (envelope-from mcrogerm@stjohn.ac.th) Received: from tulip.stjohn.ac.th ([203.151.134.104]) by stjohn.stjohn.ac.th (8.9.3+Sun/8.9.3) with ESMTP id LAA03391; Mon, 21 Apr 2003 11:56:52 +0700 (ICT) Message-Id: <5.2.0.9.0.20030421114802.00a46200@127.0.0.1> X-Sender: stjohn.stjohn.ac.th:mcrogerm@127.0.0.1 X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Mon, 21 Apr 2003 11:58:08 +0700 To: freebsd-questions@FreeBSD.ORG From: Roger Merritt In-Reply-To: <3EA363F0.1020900@users.sourceforge.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed cc: Rob Lahaye Subject: Re: How to savely upgrade software from ports? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2003 04:58:26 -0000 At 10:22 AM 4/21/03, you wrote: >I'm having trouble how to savely upgrade software to newer version in the >ports. >For example, "pkg_version -v | grep -v =" tells me: > >linux_base-7.1_2 < needs updating (port has 7.1_3) > > >I see two options, for this example: > >1) simply install 7.1_3 *without* deleting 7.1_2. > >2) delete with "-f" 7.1_2 and then install 7.1_3. > (this is what the "pkg_version -c" output suggests). > >Can someone tell me what are the pros and cons? >Is there another (safer) way of upgrading? > >Thanks, >Rob. Try running 'pkg_version -c > needs.update'. Then use your favorite editor to read "needs.update". You will find all the shell commands necessary to upgrade *all* your outdated ports, including the "pkg_delete" commands to remove the old packages. If you want to run this as a shell script you have to delete the first few lines, and you can delete the entries for any ports you don't want to upgrade at this time. You can run the commands individually by just typing them in or run 'sh ./needs.update', which will upgrade all your outdated ports. It takes a while if you have many ports, and some require interactive input, but it's a good system. If you have "portupgrade" installed you can get a picture of what needs to be done by running 'portversion -c > needs.update' to get a shell script similar to the output of 'pkg_version -c'. You can then edit the script to remove entries for any ports you don't want to upgrade right now, or you could just run the command 'portupgrade -afr' (I've been told that you need the 'f' option for dependencies which are *not* outdated). -- Roger