From owner-freebsd-questions@FreeBSD.ORG Wed Sep 2 05:05:16 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D89B106566C for ; Wed, 2 Sep 2009 05:05:16 +0000 (UTC) (envelope-from racerx@makeworld.com) Received: from omr13.networksolutionsemail.com (omr13.networksolutionsemail.com [205.178.146.63]) by mx1.freebsd.org (Postfix) with ESMTP id D8B268FC0C for ; Wed, 2 Sep 2009 05:05:15 +0000 (UTC) Received: from mail.networksolutionsemail.com (ns-omr13.mgt.hosting.dc2.netsol.com [10.49.6.76]) by omr13.networksolutionsemail.com (8.13.6/8.13.6) with SMTP id n8255E6p002145 for ; Wed, 2 Sep 2009 01:05:14 -0400 Received: (qmail 17927 invoked by uid 78); 2 Sep 2009 05:05:14 -0000 Received: from unknown (HELO chris.makeworld.com) (racerx@makeworld.com@71.113.147.228) by ns-omr13.lb.hosting.dc2.netsol.com with SMTP; 2 Sep 2009 05:05:14 -0000 Date: Wed, 2 Sep 2009 00:05:14 -0500 From: Chris To: freebsd-questions@freebsd.org Message-ID: <20090902000514.2a17510c@chris.makeworld.com> In-Reply-To: <20090902013247.a040bda9.freebsd@edvax.de> References: <20090901171553.446cdfa5@chris.makeworld.com> <20090902013247.a040bda9.freebsd@edvax.de> X-Mailer: Claws Mail 3.6.1 (GTK+ 2.16.1; i486-pc-linux-gnu) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEXi3dqyw94hEhGjoaq+y+LY09f57uT1UEQZAAAB2klEQVQ4jZWTTXucIBDHp271bmLvKYQ9E4ieNy3eiS6efdbH+f4foTMQXdn20jmgzI//vInwVv/b4P/BcfM8yrcH0Fx5NaoQOWj8/FHXT0J04mcG+gq/904IoW5R4pyLoAkTzvCNgFhJ4twOSDHDiUFnVHMHPZAfBgbnwe6g6SGaYSBvwwaa3h+AmIf3BJj3AeDqol9MZgc1AefqpkhARACcg57U3jNyLIXmlfaX6j6rp26h3POZQAgeD0BaKyujzOsFARg4R3l4UlboQcjhfUIySAOgJEZIM1oCuoogtUOEUks/jqLQUB2B45pab3+MPlek/mxox5jiEchTW1Y5+IhAl0JBHup3FEApXqgJnBHcEWgCOo66ygAJgqCPQLHu4BcBijJKjsQ5jm1osKDgy7ai1pRC6wdwwYFBAH8AIVyvE64MoOT7Ei0EXqYVScJgE5A0hEBV0F2kpqneEI+y4tNzeSS5iZZPfYE+pGkidWVoups/TYxtjrpyB5sfJz6ykt/nYDkjX/m/FeaFO0Dc/BtYpOSVgvkcmInBjSrMFYtCS4+ho+qy5GZCw420uJPoXymOodNmjLsEuLFTl8LYJZ7z/E/GN45fdDjLpUuSikGFcVsoOEnQW/9/AJaO5Ofd/Vd2AAAAAElFTkSuQmCC Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Cc: Polytropon Subject: Re: Upgrading packages 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: Wed, 02 Sep 2009 05:05:16 -0000 On Wed, 2 Sep 2009 01:32:47 +0200 Polytropon wrote: > On Tue, 1 Sep 2009 17:15:53 -0500, Chris wrote: > > Greetings, > >=20 > > Probably a long time discussed question: > > Updating a system is (or can be) done with freebsd-update. > > What is the suggested way of upgrading packages (not ports)? >=20 > There's at least portupgrade with the -P option that forces the > use of packages. You can as well use pkg_add to perform an > "upgrade-like" action, but you'll have to take care for more > things manually. >=20 >=20 >=20 =46rom sysutils/bsdadminscripts - pkg_upgrade looks like what I am after. =46rom the pkg_upgrade man page... PKG_UPGRADE(1) BSD Reference Manual PKG_UPGRADE(1) NAME pkg_upgrade - upgrade an installed package in-place SYNOPSIS pkg_upgrade [-afqsv] pkgname.cgz DESCRIPTION The pkg_upgrade command is used to upgrade an installed package in-place. If no other version of the package is installed and -a is not given, pkg_upgrade simply calls pkg_add(1). Otherwise, the installed package is deleted and the new version is added, keeping dependencies intact. The following command line options are supported: -a Ignore packages for which no older version is installed (auto). -f Force upgrading the package: Also upgrade if the exact same ver- sion is already installed, useful if you rebuilt a package from source. If a conflicting package other than an older version of the same package is installed, remove it. -q Don't print less important messages (quiet). -s Enable special treatment for shared libraries, see below (shlibs). -v Pass the -v flag to subprocesses for more verbose operation. SHARED LIBRARY SUPPORT pkg_upgrade has a special mode for upgrading shared library packages. Consider the following situation: You have installed a package foo that contains libfoo.so.1.0. Package bar is also installed and contains a binary that depends on this version of libfoo. Now you upgrade the foo package, the new version contains libfoo.so.2.0 instead. The other binary will no longer run. For this reason, systems like Debian split their library packages in two: the library itself and a "developer" package containing headers and so on. Instead, pkg_upgrade creates a "stub package" from the installed package. Basically, the installed package is split in two. The old li- braries are kept as a package named stub-pkgname while the rest is delet- ed and replaced by the new version. In the general case, this should work but you may still run into situa- tions where you will need to rebuild dependent packages from source. In any case, you can delete unused stub packages after you have rebuilt dependent packages. SEE ALSO pkg_add(1), pkg_create(1), pkg_delete(1), ports(7) --=20 Best regards, Chris () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments "There's no place like 127.0.0.1"