1 |
On Wednesday 01 December 2004 11:59, Brian Harring wrote: |
2 |
> On Wed, 2004-12-01 at 01:37, Gregorio Guidi wrote: |
3 |
> > On Tue, 30 Nov 2004 06:22:07 -0800, Brian Harring <ferringb@g.o> |
4 |
> |
5 |
> 1) don't modify $portdir/metadata/cache. Modifying the rsync'd cache |
6 |
> directly results in more to rsync for the next sync. Going that route |
7 |
> would result in a lot of dial up users out for blood. |
8 |
> 2) the user may not be using the same cache backend as the distributed |
9 |
> cache- the rsync'd cache is portage_db_flat, while the user may be using |
10 |
> a custom sqlite backend. I suspect this will be come more common place |
11 |
> whenever cvs becomes stabled- the cache backend is being refactored |
12 |
> currently. |
13 |
> 3) cleanse stale entries from the cache, so you don't end up w/ a couple |
14 |
> thousand extra files sitting in your local cache. Stable portage |
15 |
> accomplishes this by wiping *all* local cache entries, and transferring |
16 |
> the *entire* rsync'd cache over. Cvs is smarter, transfers only what |
17 |
> has changed, and removes the stale entries (this is why it's faster). |
18 |
|
19 |
I was interested exactly in points 1 and 3 (and I'm glad to hear there's even |
20 |
a sqlite backend). |
21 |
With respect to point 3, the solution you imlpemented is surely the right |
22 |
thing to do. |
23 |
With respect to point 1, maybe a good solution could be to just check cache |
24 |
validity in $portdir/metadata when the cache is needed, and write a new cache |
25 |
in /var/cache/edb if it is not valid. |
26 |
|
27 |
But since either a solution to point 3 or to point 1 would resolve the basic |
28 |
speed problem, the cvs implementation should be nearly optimal. |
29 |
|
30 |
> So... that's why portage basically copies the cache to a different |
31 |
> location. If the tree were treated as readonly, and it was enforced in |
32 |
> some manner, that transfer wouldn't be needed. This is something that's |
33 |
> being batted around also- the code for making the cache readonly is |
34 |
> already done fex. |
35 |
> ~brian |
36 |
> |
37 |
> |
38 |
> -- |
39 |
> gentoo-portage-dev@g.o mailing list |
40 |
|
41 |
Thanks a lot for your answer! |
42 |
Gregorio |
43 |
|
44 |
-- |
45 |
gentoo-portage-dev@g.o mailing list |