From owner-freebsd-questions@FreeBSD.ORG Sat Oct 15 20:52:46 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 83FAC16A41F for ; Sat, 15 Oct 2005 20:52:46 +0000 (GMT) (envelope-from petersen@petersen.plus.com) Received: from britersen.co.uk (britersen.co.uk [212.159.80.154]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8278043D46 for ; Sat, 15 Oct 2005 20:52:44 +0000 (GMT) (envelope-from petersen@petersen.plus.com) Received: from petersen (petersen@petersen.petenet [192.168.1.1]) by britersen.co.uk (8.13.4/8.13.4) with ESMTP id j9FKqgOg093779; Sat, 15 Oct 2005 21:52:43 +0100 (BST) (envelope-from petersen@petersen.plus.com) From: "Petersen" To: "'Peter Matulis'" Date: Sat, 15 Oct 2005 21:52:41 +0100 Message-ID: <003801c5d1ca$637c59e0$0101a8c0@petenet.britersen.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 In-Reply-To: <20051015190838.86886.qmail@web60012.mail.yahoo.com> Thread-Index: AcXRu+iEAsgQ8D8gSOGLhuu3BnmEIwADUQUg Cc: 'freebsd-questions' Subject: RE: portupgrade -ar (why?) 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: Sat, 15 Oct 2005 20:52:46 -0000 owner-freebsd-questions@freebsd.org <> wrote: > --- Jan Grant wrote: > >> On Sat, 15 Oct 2005, Peter Matulis wrote: >> >>> What is the use of specifying the 'r' switch when using the 'a' >>> switch? >>> >>> # portupgrade -ar >>> >>> This says to upgrade all ports plus the ones that depend on all >>> those ports. Am I missing something? Wouldn't "the ones that >>> depend" be upgraded anyway? >> >> Not necessarily. For instance: package P might use library L. A >> change in L might alter the size and layout of structures exposed to >> P. The source-level API of L is unchanged; the binary-level ABI is >> altered. So whilst the source code of P might not have changed, it >> might (for instance) be using a macro defined by a header in L that >> will look at the wrong offset in the new structure. These kinds of >> ABI compatibility problems can be fixed by recompilihng P. > > But still, a port requires upgrading or it does not. Using 'r', > portupgrade ultimately checks whether some port should be upgraded. > Are you saying that the 'r' switch involves a different decision > making process than 'a'? > > The -a switch will upgrade a port only if its version number has increased (as you know). The -r switch will upgrade a port if one of its dependancies has been upgraded, regardless of whether its version number has changed or not. e.g. Appbar-1.0 depends on libfoo-1.0. Libfoo gets a portbump to 1.1. portupgrade -r libfoo will install libfoo-1.1, plus also force a recompile and reinstallation of appbar-1.0, irrespective of the fact that appbar's version remains the same. Thus, any ABI changes that happened in libfoo that could potentially break appbar that was compiled/linked against the previous version are limited. In an ideal world, this wouldn't be a problem. ABIs and APIs should remain constant, until a library revision bump (i.e., if libfoo.1's ABI changed and broke apps, it shoulda been bumped to libfoo.2). Most times you can get away with not recompiling a port's dependants because developers, but if you don't then it can shoot you in the foot (read the recent list archives regarding openssl-0.9.8 to see an example of this). Petersen