Gentoo Archives: gentoo-portage-dev

From: Brian Harring <ferringb@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] Current portage well designed, but badly used
Date: Wed, 01 Dec 2004 12:06:14
Message-Id: 1101902921.32056.129.camel@localhost.localdomain
In Reply to: Re: [gentoo-portage-dev] Current portage well designed, but badly used by Gregorio Guidi
1 On Wed, 2004-12-01 at 03:25, Gregorio Guidi wrote:
2 > On Wednesday 01 December 2004 11:59, Brian Harring wrote:
3 > > On Wed, 2004-12-01 at 01:37, Gregorio Guidi wrote:
4 > > > On Tue, 30 Nov 2004 06:22:07 -0800, Brian Harring <ferringb@g.o>
5 > >
6 > > 1) don't modify $portdir/metadata/cache. Modifying the rsync'd cache
7 > > directly results in more to rsync for the next sync. Going that route
8 > > would result in a lot of dial up users out for blood.
9 > > 2) the user may not be using the same cache backend as the distributed
10 > > cache- the rsync'd cache is portage_db_flat, while the user may be using
11 > > a custom sqlite backend. I suspect this will be come more common place
12 > > whenever cvs becomes stabled- the cache backend is being refactored
13 > > currently.
14 > > 3) cleanse stale entries from the cache, so you don't end up w/ a couple
15 > > thousand extra files sitting in your local cache. Stable portage
16 > > accomplishes this by wiping *all* local cache entries, and transferring
17 > > the *entire* rsync'd cache over. Cvs is smarter, transfers only what
18 > > has changed, and removes the stale entries (this is why it's faster).
19 >
20 > I was interested exactly in points 1 and 3 (and I'm glad to hear there's even
21 > a sqlite backend).
22 Nothing official sqlite thus far, I just know a couple of people who are
23 did their own DIY backend for it. The cache refactoring should include
24 a sqlite backend, although it hasn't been coded yet.
25
26 > With respect to point 3, the solution you imlpemented is surely the right
27 > thing to do.
28 > With respect to point 1, maybe a good solution could be to just check cache
29 > validity in $portdir/metadata when the cache is needed, and write a new cache
30 > in /var/cache/edb if it is not valid.
31 Err... elaborate
32 Assuming I'm following, you're proposing doing the updates to local
33 cache, and reading from the metacache? If so, that's twice the level of
34 potential stats/reads required, which won't speed it up much :)
35 ~brian
36
37
38
39 --
40 gentoo-portage-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-portage-dev] Current portage well designed, but badly used Gregorio Guidi <g.guidi@×××.it>