Gentoo Archives: gentoo-user

From: BRM <bm_witness@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Emerge Problems...
Date: Wed, 02 Feb 2011 18:06:27
Message-Id: 741750.71780.qm@web39307.mail.mud.yahoo.com
In Reply to: Re: [gentoo-user] Re: Emerge Problems... by Peter Humphrey
1 >From: Peter Humphrey <peter@××××××××××××××.org>
2 >On Tuesday 01 February 2011 20:43:43 BRM wrote:
3 >> And you're doing a typically manual process for updating all the
4 >> systems - update your server first, then any rsync clients. Fine &
5 >> dandy if that is your process - but it's not mine. I may update my
6 >> laptop twice as often as the other two, especially if I want to play
7 >> with some software or try something out, or fix a bug, or get a
8 >> later version of KDE. The server gets updated may be once a month,
9 >> while the laptop is either once a month or at whim when I want
10 >> something that just came out.
11 >>
12 >> It's not harder to do it this way, just a different method. The
13 >> original rsync script worked perfectly fine; the broken update I did
14 >> when I lost it is what started this whole thread.
15 >What's wrong with keeping your server's portage cache up to date? You don't have
16 >
17 >to update the server from it if you don't want to, but if the cache is out of
18 >date it isn't being much of a server.
19 >I recommend Occam's Razor.
20 >--
21
22 Here's the problem with the Server's /usr/portage being hosted by rsync:
23
24 - Server sync's its portage against gentoo mirrors (emerge --sync)
25 - Update Server (emerge world -vuDN)
26 - Client sync's its portage against server portage mirror (emerge --sync)
27 - Update Client (emerge world -vudN)
28
29 So if you are manually updating the server, then no problem - you control the
30 timing.
31
32 Now all that seems to work fine until you introduce the automatic updates of the
33 server's portage, e.g. via cron.
34 Suppose the Server Update doesn't complete due to a build error. If the server
35 automatically updated its portage during the build time then when you go to redo
36 the build you may end up with another set of updates to push in, meanwhile you
37 haven't finished the last round. Sure, the clients will still update just fine -
38 it's not a problem for _them_, it's a problem for the server.
39
40 So, Occam's Razor - store the rsync hosted portage mirror separately from the
41 server's /usr/portage copy, and sync the server against the local rsync just
42 like all the clients.
43 The rsync hosted mirror can now be updated at will without any repercussions to
44 any install, and the server works just like any of the clients; so now you end
45 up with:
46
47 - sync server portage mirror against gentoo mirrors at scheduled intervals, e.g.
48 every day at midnight
49 - Server sync's its portage against server portage mirror (emerge --sync)
50 - Update Server (emerge world -vuDN)
51 - Client sync's its portage against server portage mirror (emerge --sync)
52 - Update Client (emerge world -vudN)
53
54 The server is now completely 100% independent of the portage it is hosting for
55 everyone else on the internal network, and you can get through a full update -
56 resolving all issues, etc. - before any re-syncing.
57
58 So then the question becomes why run the night cron to update the server's
59 portage mirror?
60 B/c I am not updating or installing software on my server as frequently as my
61 other systems; so it doesn't need to be in sync itself as frequently.
62
63 Ben