----- Original Message ----

> From: Dale <rdalek1...@gmail.com>
> Nils Holland wrote:
> > On 21:35 Mon 31 Jan     , Francesco  Talamona wrote:
> >> On Monday 31 January 2011, BRM  wrote:
> >>> I just wrote a new  script last night, but I'm still not sure that all
> >>> of the   parameters are correct
> >>>        
> >>  Why not something proven and reliable like "emerge --sync"?
> >>       
> > In fact, what I always do is sync one of my machines with  an official
> > Gentoo mirror via "emerge --sync", and then I just use rsync  to
> > distribute the updated tree to all my other local machines as  in:
> > 
> > rsync --delete -trmv  /usr/portage/<user>@<dest_host>:/usr/portage
> > 
> > One  might want to ask rsync to exclude the distfiles directory,
> > but I always  include it as it oftentimes saves me the download of a
> > file I've already  downloaded during an emerge on another machine.
> > 
> > In any case,  locally updating my tree via rsync has always worked fine
> > for me.  Leaving the "--delete" option to rsync out, however,
> > immediately leads  to problems, with various ebuild-related error
> > messages on subsequent  "emerge"s. I can imagine that the OP did, in
> > fact, update his tree in  such an inconsistent manner, but that can
> > certainly be fixed, with the  surest way being a "emerge --sync" using
> > an official mirror.
> > 

Definitely missed the delete option on the new script.

> Maybe I am missing  something but I have two machines here.  I sync to the 
>Gentoo servers with  the main rig and then sync the second rig from the main 
>rig.  All you have  to do is start the rsync service and set the IP address in 
>the SYNC line in  make.conf on the second rig.  This is my rsyncd.conf on the 
>main  rig:
> 
> # Simple example for enabling your own local rsync  server
> [gentoo-portage]
> path = /usr/portage
> comment = Gentoo Portage  tree
> exclude = /distfiles /packages
> 
> If you want to include distfiles,  just remove it from the exclude line.  For 
>my distfiles, I run  http-replicator to fetch those.  It works pretty  well.
> 

If the machine you are hosting portage on (via rsync) is fast enough to 
complete 
all updates within the update cycle (e.g. sync'ing 1 time a day, so it has 
23:59:59 to complete all builds) then it is likely not a problem to do as that.

If the machine is not fast enough - mine is a PII 233 w/160 MB RAM, takes a 
while do to updates - then you really have to separate out what you are hosting 
from what you are using. Otherwise you end up in the situation that you have 
started one system update (or software install), have a build failure for 
whatever reason, and then can't complete the same one due to changes in the 
local copy of portage.

So, even if your system fell into the first situation - where it is fast enough 
- then I would still recommend doing the little extra to run as the second 
situation. It's just far easier to maintain. I'm actually surprised the Gentoo 
Mirror documentation doesn't recommend doing this to start with, but then again 
- the machine they recommend are magnitudes faster than what I'm running so 
it's 
not likely an issue. (Either that or everyone figures it out on their own and 
then just doesn't say anything.)

Why?

The local portage copy is always up-to-date, or reasonably so. No - I don't 
sync 
every 1/2 hour (like the official mirrors do), but I could force it to sync 
when 
I need to if that was an issue; typically once a day is sufficient and that's 
run by a cron job. But I also keep my server system relatively stable - I don't 
install a lot of software on it, and I don't necessarily update it frequently. 
So now I can update my laptop and desktop as well without having to first 
update 
the server itself since the rsync hosted portage is independent of the server.

Ben

Reply via email to