From owner-freebsd-stable@FreeBSD.ORG Thu Jul 3 10:43:19 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC6FF10656B4 for ; Thu, 3 Jul 2008 10:43:19 +0000 (UTC) (envelope-from andrew@rinet.ru) Received: from mail.tsscom.ru (mail.tsscom.ru [195.10.205.29]) by mx1.freebsd.org (Postfix) with ESMTP id 3CC318FC34 for ; Thu, 3 Jul 2008 10:43:18 +0000 (UTC) (envelope-from andrew@rinet.ru) Received: from [195.10.205.145] (HELO [10.10.80.29]) by mail.tsscom.ru (CommuniGate Pro SMTP 5.1.8) with ESMTP id 247220 for freebsd-stable@freebsd.org; Thu, 03 Jul 2008 13:43:16 +0400 From: Andrew Kolchoogin To: freebsd-stable@freebsd.org In-Reply-To: <486AAB93.1050606@menhennitt.com.au> References: <486AAB93.1050606@menhennitt.com.au> Content-Type: text/plain Organization: Cronyx Plus LLC Date: Thu, 03 Jul 2008 13:43:15 +0400 Message-Id: <1215078195.9029.22.camel@akela> Mime-Version: 1.0 X-Mailer: Evolution 2.12.2 Content-Transfer-Encoding: quoted-printable Subject: Re: installdate of a port/package? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2008 10:43:19 -0000 Wed, 02/07/2008 =D0=B2 08:11 +1000, Graham Menhennitt writes: > Ronald Klop wrote: > > I just upgraded a machine from FreeBSD 6 to 7. Very nice. > > But my portupgrade -fa failed after a while. > > ... > > How do I know which ports I still need to update? > Run "portupgrade -fan" ... ... and it will suggest you to reinstall/upgrade everything. :) "portupgrade -an" will do suggest you to upgrade only outdated packages, but trouble in question is in that there is no way to determine what version of FreeBSD package was built on, neither using base system utilities, nor using tools from ports-mgmt/ -- one may suggest me to do this the way Gentoo's "revdep-rebuild" script does -- i.e., using ldd to determine which version of libc.so executable in question is linked with, asking pkg_info about what port contains the file and rebuilding such a port with portupgrade, this method is more or less good, but it is not a universal one. First of all, there're statically linked executables. Oh, well, one might use "strings" to extract them from executable and try to guess C compiler version executable was built with, but, in my opinon, human trying to rely on method described above is a "dangerous sharlatan" (C) opensolaris.org, BrandZ community. :) Second, there're a couple of ports that contains only libraries, and there're TONS of software which doesn't use advanced capabilities of modern link editors that are able to link one shared library with others, thus giving a large chance to run-time link editor to choke from incorrect versions of shared libraries, and making our first method of determining fairly useless. At last, but not at least, one can rely on versioned symbols, but this method can be used when people will upgrade old and obsolete RELENG_7 to modern and sexy RELENG_8, :) so I will not discuss it here at least in three years. ;) Conclusion: when you're upgrading from (n-1).x to n.x and starting "portupgrade -fa", in my opinion, the only safe choice in a case of "portupgrade -fa" faults is to start it again (oh-eh!). It's feasible, though, to avoid use of "portupgrade -fa" -- prepare list of packages with dependencies using "portupgrade -nfa" and use the simplest shell statement: for i in `cat package-list`; do portupgrade -f $i; done --=20 Andrew Kolchoogin Cronyx Plus LLC