1 |
On Fri, 2004-06-11 at 23:15, Philippe Lafoucrière wrote: |
2 |
> Hi all |
3 |
> |
4 |
> I'm wondering where I can find some doc about portage, and especially |
5 |
> the cache part. I use debian at work, and get so sad when doing an |
6 |
> emerge rsync at home (10 or 15 minutes to rsync, and almost 5 minutes to |
7 |
> calculate world dependancies) on a bi-athlon 1.8GHz. |
8 |
> |
9 |
> I just wanted to check that the cache system is really a cache :) |
10 |
> |
11 |
> maybe ebuilds should be "compiled" into seriaziled objects or something |
12 |
> similar. Only an emerge rsync (or something called "emerge update") |
13 |
> would fetch new ebuilds, and compile new ones (we don't care anymore of |
14 |
> hand modified files after sync). |
15 |
|
16 |
Mabey rfc2616 can be of some nice inspiration about caching. |
17 |
As always, I refer to Roy T. Fielding's "Architectural Styles and |
18 |
the Design of Network-based Software Architectures" as a must read. |
19 |
|
20 |
> |
21 |
> |
22 |
> On the other hand, I was thinkink of the "rsync way" to synchronise the |
23 |
> portage tree. Why don't we use a portage tree ID (incremented each time |
24 |
> an ebuild is commited to CVS). For exemple, I have the tree number |
25 |
> 12512. Current portage tree ID is 12514. I just need too fresh ebuilds. |
26 |
|
27 |
You have just described subversion... |
28 |
Anyway you might want to experiment with cvsup vs. rsync. |
29 |
|
30 |
> Moreover, do I REALLY need all ebuilds content ???? Why can't portage |
31 |
> just look at some headers (with arch, desc, etc.) and left the install |
32 |
> part on other files. Rsync local tree would be lighter, and faster to |
33 |
> sync. When you need to emerge some program, emerge would download the |
34 |
> _real_ ebuild file, the digests, the distfiles, etc. |
35 |
|
36 |
Do some experiments and benchmarking. What if only the cache was |
37 |
downloaded at sync? Say you have a sql backend for portage, just sync |
38 |
that and download the ebuilds on demand. |
39 |
|
40 |
|
41 |
> The headers can also be contained in one large tar.gz file, to reduce |
42 |
> bandwith again (I know, like debian). |
43 |
> |
44 |
> I know this stuff might let you think I'm crazy to rebuild all portage, |
45 |
> but here are some ideas to dig :D |
46 |
|
47 |
Personally I like crazy =) I think you should have a better |
48 |
understanding of the current system before you criticise it though. |
49 |
|
50 |
<quote>rsync is a file transfer program for Unix systems. rsync uses the |
51 |
"rsync algorithm" which provides a very fast method for bringing remote |
52 |
files into sync. It does this by sending just the differences in the |
53 |
files across the link, without requiring that both sets of files are |
54 |
present at one of the ends of the link beforehand.</quote> |
55 |
|
56 |
rsync allready does it's best to only download new information. |
57 |
|
58 |
-John |