From owner-freebsd-ports@FreeBSD.ORG Wed Feb 6 09:51:33 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF38716A421; Wed, 6 Feb 2008 09:51:33 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id 91A7613C455; Wed, 6 Feb 2008 09:51:33 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id 87E571CC031; Wed, 6 Feb 2008 01:51:33 -0800 (PST) Date: Wed, 6 Feb 2008 01:51:33 -0800 From: Jeremy Chadwick To: "??????????????? (Shantanoo)" Message-ID: <20080206095133.GA94134@eos.sc1.parodius.com> References: <1563a4fd0802052211h623de132q68a1ad0c8a9b930c@mail.gmail.com> <230174700802060040x4f2a0815r1a4bdc7fccf62b5d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <230174700802060040x4f2a0815r1a4bdc7fccf62b5d@mail.gmail.com> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: navneet Upadhyay , freebsd-binup@freebsd.org, freebsd-questions@freebsd.org, freebsd-ports@freebsd.org Subject: Re: Upgrading the Installed package X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2008 09:51:33 -0000 On Wed, Feb 06, 2008 at 02:10:19PM +0530, ??????????????? (Shantanoo) wrote: > On Feb 6, 2008 11:41 AM, navneet Upadhyay wrote: > > Hi, > > I have two binary packages of an application of version 1.1 and 1.2. > > *The 1.1 is already installed, how can i upgrade it to 1.2* ? > > > > Do i have to uninstall 1.1 and then install 1.2 ? I would prefer a way by > > which i can upgrade an wxisting package without uninstalling. > > > > You may try portupgrade which can handle upgrades for you. > more info on: http://www.onlamp.com/pub/a/bsd/2003/08/28/FreeBSD_Basics.html Sigh... why do people always recommend portupgrade to users without telling them of the caveats? I grow tired of this. So let's tell Navneet exactly what he's getting into, shall we? portupgrade: - Written in Ruby, which not many UNIX admins are familiar with (compared to, say, perl). If portupgrade has a bug, you will need to speak Ruby. - Ruby is not included in the base system; you have to install it from ports (read: just another thing to have to maintain...) ports base system: - C-based, and includes all of the pkg_* utilities. Nearly every FreeBSD user/administrator is familiar with these tools. - gcc comes with the base system. portupgrade: - Maintains its own database of ports installed, dependencies, and so on -- COMPLETELY separate from that of the ports base system. - Said database must be kept in sync with ports base system dependencies and other whatnots; and if they go out of sync (which happens regularly as can be confirmed by the never-ending supply of posts to freebsd-ports@ about portupgrade problems), you get to read incredibly cryptic error messages from Ruby. - Said database is Berkeley DB-based, which means you have to install Oracle/Sleepycat BDB from ports. (I believe you can pick DB1.x which comes with libc, but it's not recommended due to bugs). ports base system: - Uses flat text files in /var/db/pkg and /var/db/ports. The reason portupgrade uses its own database is supposedly due to the shortcomings/oversights of the existing ports system, and that's a legitimate point.. But my opinion is that these shortcomings/oversights should be addressed in the ports system and not via some third-party tool which adds unnecessary complexities and more headaches. Thus, I would suggest people go with the KISS (Keep It Simple, Stupid!) method, and consider using tools which are written in languages which come with the base system (e.g. C or sh) -- but even more importantly, use and rely solely on the ports base system. One such tool is portmaster (ports-mgmt/portmaster), maintained by Doug Barton. It's actively maintained and written in sh. Its author is quite active with freebsd-ports, and is quick to respond to both bug reports and feature requests. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |