Add CONTENTS indexing support for optimization of owner lookups. The
authorZac Medico <zmedico@gentoo.org>
Mon, 9 Jun 2008 15:34:21 +0000 (15:34 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 9 Jun 2008 15:34:21 +0000 (15:34 -0000)
commit3ba595090de65c3d1eef2c9c6ad99f50f8b8c911
treee93a91a25deff8801da4f4ae89991b6de2701cba
parent48452a4675c33b7b344df217ee3cb4753e2ecd04
Add CONTENTS indexing support for optimization of owner lookups. The
vardbapi cache maintains a hash table (inside vdb_metadata.pickle)
that serves to index package contents by mapping the basename of file
to a list of possible packages that own it. This is used to optimize
owner lookups by narrowing the search down to a smaller number of
packages. It increases the size of vdb_metadata.pickle by approximately
30% and it's used in the following cases:

 * When an unexpected file collision occurs (whether
   or not collision-protect is enabled)

 * `emerge <filename>`

 * `portageq owners`

(trunk r10609)

svn path=/main/branches/2.1.2/; revision=10622
bin/emerge
bin/portageq
pym/portage.py