From owner-freebsd-doc@FreeBSD.ORG Fri Dec 26 17:55:20 2008 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E480106564A for ; Fri, 26 Dec 2008 17:55:20 +0000 (UTC) (envelope-from fender0107401@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.188]) by mx1.freebsd.org (Postfix) with ESMTP id BD2B98FC16 for ; Fri, 26 Dec 2008 17:55:19 +0000 (UTC) (envelope-from fender0107401@gmail.com) Received: by ti-out-0910.google.com with SMTP id a1so2623325tib.3 for ; Fri, 26 Dec 2008 09:55:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer; bh=c6iuY5TfJOIcdiZ4oJ9CD8vPrjA7cnkoEXoYmPtWQ1g=; b=wAbUjoThMug8iLgtH1HYK8zGc3VAt57Z21L3UUJ1c4cF0NRvKLaj0T92SE7PTiEiVm 06WUQWRCB/WRvBUTK+hYy4lOQ3Clcd+kw8Ytm7NBwdHwXZATjFEzE4CYrxx1QKzk3bz8 n9cRR6D5LdeNqIRk0jRdK0GPXKWc+HV1inKZg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer; b=mV2xzHxlQY3CKgDiuGSaLK45ZxDpJPdU7FqMxKN2PVTxs97ogdPLkU70gLEZcfi8e6 VTdUp37b85Yitoy9+2jSdtavWo76sJ+aCEW1BE7nDEjnPcYL4CgIsrH4zVrrmm+fnqMu WyFqKR1xucoHHXEea0LewS+1JAI8gfPi6uoZg= Received: by 10.110.16.9 with SMTP id 9mr17045182tip.1.1230314118532; Fri, 26 Dec 2008 09:55:18 -0800 (PST) Received: from ?192.168.0.250? ([219.243.32.29]) by mx.google.com with ESMTPS id a14sm1650817tia.32.2008.12.26.09.55.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 26 Dec 2008 09:55:17 -0800 (PST) From: Li To: Matthew Seaman In-Reply-To: <49535D60.2060101@infracaninophile.co.uk> References: <1230175126.1189.26.camel@localhost> <49535D60.2060101@infracaninophile.co.uk> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-5yrGRbrOPshXKqmL+o4Q" Date: Sat, 27 Dec 2008 01:55:07 +0800 Message-Id: <1230314107.68216.6.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port Cc: freebsd-doc@freebsd.org Subject: Re: A question about update(I think it should be added to our faq). X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2008 17:55:20 -0000 --=-5yrGRbrOPshXKqmL+o4Q Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Thank you very much for the reply,=20 :) Your explanation is very well,=20 but I have another related question: If I use ccache, whether should I use "ccache -C" to clean up the compilation time cache? I think the cache will cause some trouble, if don't clean it. On Thu, 2008-12-25 at 10:16 +0000, Matthew Seaman wrote: > Li wrote: >=20 > > The question is: > >=20 > > If I update system from release_6.1 to release_7.0, whether I should > > re-compile every ports use the "portupgrade -af" command. > >=20 > > Somebody told me "yes", "no" or "recommendatory", but they have not giv= e > > me any explanation, so I am confused about it. >=20 > Something like this as an answer to the FAQ? >=20 > The answer is definitely "yes" -- while a 7.0 system will run with > software compiled under 6.1, you will end up with stuff randomly > crashing and failing to work once you start installing other ports or > updating a portion of what you already have. >=20 > The simple reason is that software compiled for 6.1 will link against > libc.so.6 and software compiled on 7.0 will link against libc.so.7 --=20 > this includes other shlibs, loadable modules etc. which themselves can be > linked against or loaded by end-user applications. Applications that > ultimately try to load two different versions of libc.so tend to have > short and unhappy lives. >=20 > However, simply doing 'portupgrade -af' unfortunately won't get you > there. portupgrade itself will crash when it updates packages it > depends on. >=20 > There are three procedures that should work effectively: >=20 > 1) Make a list of all your installed software, then 'pkg_delete -a' > to remove everything and then reinstall it all from scratch. This > is the most effective method, in that it's impossible for any > packages to slip through un-updated, but it means downtime for > everything on that server throughout the whole update procedure.=20 > If you have pkgs pre-built for everything you need so you can > reinstall quickly, then this is definitely the way to go. >=20 > 2) First, delete portupgrade and everything it depends on. ie. > =20 > pkg_info -qrx portupgrade | cut -d ' ' -f 2 | xargs pkg_delete -f >=20 > (Note: 'pkg_deinstall -fR portupgrade' is not recommended)=20 >=20 > Then reinstall portupgrade (and dependencies): >=20 > cd /usr/ports/port-mgmt/portupgrade > make install > pkgdb -F >=20 > And then use the newly rebuilt portupgrade to reinstall all the > rest of the software on the machine -- or rather, all ports installed > before the current date: >=20 > portupgrade -f '<2008-12-25' >=20 > The big advantage of this command is that if something goes wrong (an= d > it is quite likely to), you can fix the problem and then rerun the sa= me > command to pick up anything still left un-updated. >=20 > 3) Use portmaster instead of portupgrade. Very simple, and because > portmaster is a /bin/sh script with no dependencies other than > the base system it won't suffer the same randomly-crashing fate. >=20 > Cheers, >=20 > Matthew >=20 --=-5yrGRbrOPshXKqmL+o4Q Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEABECAAYFAklVGnsACgkQmVapie7+cWxVyACeMzCBxGOvdw52xzQ/vSgneC+c mvIAn3H2RQrS2BfhbCGZI+xnpqgBBZKX =DxoV -----END PGP SIGNATURE----- --=-5yrGRbrOPshXKqmL+o4Q--