Gentoo Archives: gentoo-portage-dev

From: Jason Stubbs <jstubbs@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 13:37:26
Message-Id: 200412012238.53440.jstubbs@gentoo.org
In Reply to: Re: [gentoo-portage-dev] Current portage well designed, but badly used by Gregorio Guidi
1 On Wednesday 01 December 2004 22:25, Gregorio Guidi wrote:
2 > Nah, it would be something like:
3 > - see if cache exists in /var/cache/edb (one cheap access() call)
4 > - if it exists, validate (costly stat() calls, but 99% success)
5 > - if it does not exists or is not valid, read cache in $portdir/metadata
6 > and validate (stat() calls, 99% success).
7 > - if cache is not valid, create new cache in /var/cache/edb (ebuild
8 > sourcing: takes a lot of times).
9 > - read cache.
10 >
11 > - after emerge sync, go through cache files in /var/cache/edb (usually not
12 > many) and remove entries corresponding to deleted ebuilds.
13
14 You've just described what portage does with almost perfect accuracy. Let me
15 rearrange it for you:
16
17 > - see if cache exists in /var/cache/edb (one cheap access() call)
18 > - if it exists, validate (costly stat() calls, but 99% success)
19 > - if cache is not valid, create new cache in /var/cache/edb (ebuild
20 > sourcing: takes a lot of times).
21 > - read cache.
22
23 > - after emerge sync, go through cache files in /var/cache/edb (usually not
24 > many) and remove entries corresponding to deleted ebuilds.
25 > - if it does not exists or is not valid, read cache in $portdir/metadata
26 > and validate (stat() calls, 99% success).
27
28 If /var/cache/edb is not valid during standard emerge operation, there is
29 almost no chance that $portdir/metadata will be valid.
30
31 Please do some research before putting forth any more "new" ideas. The code is
32 not easy to read, but is getting better. However, unless you're willing to
33 put in the effort of deciphering it, making suggestions is by no means
34 helpful.
35
36 Regards,
37 Jason Stubbs
38
39
40
41 --
42 gentoo-portage-dev@g.o mailing list