Get estimated package count when populating databases
commit5dae577a87795e7666f05613cf9aa7207fd17346
authorDan McGee <dan@archlinux.org>
Mon, 24 Jan 2011 23:48:54 +0000 (24 17:48 -0600)
committerAllan McRae <allan@archlinux.org>
Thu, 3 Feb 2011 23:55:45 +0000 (4 09:55 +1000)
tree5e898c5c7290e83bf6da41c9bfd6293a24269d56
parente17b0446bd815f7b25f5bf0b838ef3d02d4eb64e
Get estimated package count when populating databases

This works for both local and sync databases in slightly different ways. For
the local database, we can use the directory hard link count on the local/
folder. For sync databases, we use the archive size coupled with some
computed average per-package sizes to determine an estimate.

This is currently a dead assignment once calculated, but could be used to
set the initial size of a hash table.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
lib/libalpm/be_local.c
lib/libalpm/be_sync.c