Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Nov 2011 14:05:23 +0100
From:      Daniel Nebdal <dnebdal@gmail.com>
To:        freebsd-ports@freebsd.org
Subject:   Re: cvs checkout ./. csup
Message-ID:  <CA%2Bt49P%2BP-kUeJ7Y-ugtBzBH-7V_mPHJZnsP_LL4-%2BVuycs9_Mw@mail.gmail.com>
In-Reply-To: <4EC2466B.3020808@infracaninophile.co.uk>
References:  <20111115094823.GA9461@sh4-5.1blu.de> <4EC2466B.3020808@infracaninophile.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Nov 15, 2011 at 12:00 PM, Matthew Seaman
<m.seaman@infracaninophile.co.uk> wrote:
> On 15/11/2011 09:48, Matthias Apitz wrote:
>> Since many years I'm fetching or updating /usr/ports with
>>
>> # cd /usr
>> # setenv CVSROOT :pserver:anoncvs@anoncvs.fr.FreeBSD.org:/home/ncvs
>> # cvs checkout ports
>>
>> and later do the updating just with:
>>
>> # cd /usr/ports
>> # cvs update
>> # portupgrade -ai
>>
>> The FreeBSD handbook describes (or recommends?) using 'csup' for
>> updating ports tree... What is the advantage (or reason, if any)?
>
> Efficiency, basically. =A0csup should require less bandwidth and put less
> load on servers than using cvs directly. =A0It works like rsync, only
> transferring the parts of the files that changed but exploiting the cvs
> revision history to produce more specific and minimal deltas than you
> can get just by using the standard rsync algorithm.
>
> However csup(1) doesn't give you any of the VCS features you'ld get by
> doing a cvs checkout -- so no simple way to diff a local copy against
> the repo, etc. etc. 'cvs checkout' of all or parts of the ports is still
> frequently preferable for developing rather than just using the ports.
>
> There are also many more cvsup servers worldwide than there are anon-cvs
> servers.
>

There's also portsnap, which has been in the base system for a while
now. It has some of the same drawbacks as csup/cvsup (no VCS
features), but is in my experience faster than them. In short, you can
use "portsnap fetch extract" to download a complete compressed tarball
of current ports and extract it, and after doing that you can use
"portsnap fetch update" to update to the current state. Read the
manpage; there are some important details.

It uses a binary patch system that's quite efficient, so if you just
want an updated /usr/ports , it's probably the fastest solution. (I
think the exact method is that "fetch" grabs a tarball if it doesn't
exist. If it does exist, it gets the binary patches required to update
it to the current state. With it in place, "extract" unpacks the
entire thing, and "update" only extracts the files touched by the last
"fetch"-command.)

It has a handbook page: http://www.freebsd.org/doc/handbook/portsnap.html

--=20
Daniel Nebdal



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2Bt49P%2BP-kUeJ7Y-ugtBzBH-7V_mPHJZnsP_LL4-%2BVuycs9_Mw>