Gentoo Archives: gentoo-portage-dev

From: Marius Mauch <genone@g.o>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] making aux_get more usable for vardbapi
Date: Tue, 10 Jan 2006 18:53:43
Message-Id: 20060110195304.765168ef@sven.genone.homeip.net
1 Currently vardbapi.aux_get only works for a subset of all auxdbkeys, as
2 some like KEYWORDS or DESCRIPTIOn aren't stored in vdb directly.
3 They are however stored in environment.bz2, but not accessible
4 there.
5 This is unintuitive and limits tools like equery or my own auxget
6 and metascan tools in their usability.
7
8 There are two solutions to this problem:
9 a) enhance vardbapi.aux_get so it can use environment.bz2
10 b) store more keys in vdb
11
12 Now there is a tradeoff to made: a) doesn't need space but is slow
13 while b) is fast but needs space, both in non-trivial amounts (runtime
14 increased from 1s to 9s for a metascan -i run and from 0.5s to 0.8s
15 for auxget -i, haven't actually checked the size increase, expect
16 somewhere between 1 and 10 megabytes on a typical install).
17
18 I'm attaching a patch that implements both (each in it's own hunk) as
19 well as a new emaint option to create the missing entries offline.
20
21 A not so obvious issue with a) is that due to the recent
22 storage optimizations (empty entries not being stored) it's worse than
23 I originally expected, as any entry missing a file will be looked up in
24 env.bz2 instead. Only way to avoid that would be to add special casing
25 in aux_get which I really dislike.
26
27 Opinions?
28
29 Marius
30
31 --
32 Public Key at http://www.genone.de/info/gpg-key.pub
33
34 In the beginning, there was nothing. And God said, 'Let there be
35 Light.' And there was still nothing, but you could see a bit better.

Attachments

File name MIME type
portage-vdb-auxget-complete.diff text/x-patch
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-portage-dev] making aux_get more usable for vardbapi Brian Harring <ferringb@g.o>