A wrapper library around dpkg to make it use tokyocabinet (or sqlite) and speed it up when reading database. See http://yourcmc.ru/wiki/Tdpkg
 
 
Go to file
Luca Bruno 062ad81d41 Copyright notice to all files 2010-03-15 15:36:27 +01:00
.gitignore Release 1.0 version 2010-03-15 14:41:08 +01:00
AUTHORS First commit 2010-03-14 20:18:51 +01:00
COPYING First commit 2010-03-14 20:18:51 +01:00
Makefile Fix sqlite and fstat on 32-bit 2010-03-15 13:00:20 +01:00
README Release 1.0 version 2010-03-15 14:41:08 +01:00
cache-sqlite.c Unlink list file with sqlite 2010-03-15 14:21:59 +01:00
cache-tokyo.c Remove filename for tokyocabinet 2010-03-15 14:29:40 +01:00
cache.h Copyright notice to all files 2010-03-15 15:36:27 +01:00
tdpkg.c Unlink list file with sqlite 2010-03-15 14:21:59 +01:00
util.c Copyright notice to all files 2010-03-15 15:36:27 +01:00
util.h Copyright notice to all files 2010-03-15 15:36:27 +01:00

README

The `tdpkg' shared library is used to speed up dpkg .list files loading using
either tokyocabinet or sqlite3.
Homepage: http://lethalman.hostei.com/tdpkg.html

REQUIREMENTS

build-essential
libsqlite3-dev for sqlite backend
libtokyocabinet-dev for tokyocabinet backend

BUILD

Type `make' to build tdpkg with tokyocabinet support.
Type `make CACHE=sqlite' instead to build tdpkg with sqlite3 support.
You'd better not install this library, it could make your system highly
unstable.

USAGE

Please make a backup copy of your /var/lib/dpkg/info directory before using
tdpkg.

Manual usage:
LD_PRELOAD=./libtdpkg.so dpkg ...

For system-wide usage use an alias (make sure you the absolute path to
libtdpkg.so):
alias dpkg="LD_PRELOAD=/path/to/libtdpkg.so dpkg"

The cache for both sqlite3 and tokyocabinet is located at
/var/lib/dpkg/info/tdpkg.cache.

BENCHMARKING

The operations involved with dpkg database reading are mostly done on the file system.
For this reason cleaning up the kernel cache is a must before calling either tdpkg or dpkg:

echo 1 > /proc/sys/vm/drop_caches