Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Dec 2008 01:55:07 +0800
From:      Li <fender0107401@gmail.com>
To:        Matthew Seaman <m.seaman@infracaninophile.co.uk>
Cc:        freebsd-doc@freebsd.org
Subject:   Re: A question about update(I think it should be added to our faq).
Message-ID:  <1230314107.68216.6.camel@localhost>
In-Reply-To: <49535D60.2060101@infracaninophile.co.uk>
References:  <1230175126.1189.26.camel@localhost> <49535D60.2060101@infracaninophile.co.uk>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Thank you very much for the reply, 

:)

Your explanation is very well, 

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:
> 
> > The question is:
> > 
> > If I update system from release_6.1 to release_7.0, whether I should
> > re-compile every ports use the "portupgrade -af" command.
> > 
> > Somebody told me "yes", "no" or "recommendatory", but they have not give
> > me any explanation, so I am confused about it.
> 
> Something like this as an answer to the FAQ?
> 
> 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.
> 
> 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 -- 
> 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.
> 
> However, simply doing 'portupgrade -af' unfortunately won't get you
> there.  portupgrade itself will crash when it updates packages it
> depends on.
> 
> There are three procedures that should work effectively:
> 
>  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. 
>     If you have pkgs pre-built for everything you need so you can
>     reinstall quickly, then this is definitely the way to go.
> 
>  2) First, delete portupgrade and everything it depends on.  ie.
>     
>        pkg_info -qrx portupgrade | cut -d ' ' -f 2 | xargs pkg_delete -f
> 
>     (Note: 'pkg_deinstall -fR portupgrade' is not recommended) 
> 
>     Then reinstall portupgrade (and dependencies):
> 
>        cd /usr/ports/port-mgmt/portupgrade
>        make install
>        pkgdb -F
> 
>     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:
> 
>        portupgrade -f '<2008-12-25'
> 
>     The big advantage of this command is that if something goes wrong (and
>     it is quite likely to), you can fix the problem and then rerun the same
>     command to pick up anything still left un-updated.
> 
>  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.
> 
> 	Cheers,
> 
> 	Matthew
> 

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)

iEYEABECAAYFAklVGnsACgkQmVapie7+cWxVyACeMzCBxGOvdw52xzQ/vSgneC+c
mvIAn3H2RQrS2BfhbCGZI+xnpqgBBZKX
=DxoV
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1230314107.68216.6.camel>