Requirements: build-essential, libsqlite3-dev (for the sqlite3 backend) and libtokyocabinet-dev (for the tokyocabinet backend)
make to build tdpkg with tokyocabinet support.
make CACHE=sqlite instead for sqlite3 support.
Important: You'd better not install this library, it could make your system highly unstable.
Please make a backup copy of your /var/lib/dpkg/info/ directory before using tdpkg.
LD_PRELOAD=./libtdpkg.so dpkg ...
For system-wide usage use an alias (make sure you use the absolute path to
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.
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