Sqlite cache backend for portage: Steps to install: 1. `emerge pysqlite` 2. copy modules to /etc/portage 3. copy portage_db_portage.py to /usr/lib/portage/pym 4. execute `init.sh` 5. `emerge regen`
Created attachment 32234 [details] initialize database
Created attachment 32235 [details] modules file
Created attachment 32236 [details] sql
Created attachment 32237 [details] portage-sqlite/portage_db_sqlite.py
Comment on attachment 32234 [details] initialize database >#!/bin/bash > >cat portage-sqlite-init-db.sql | sqlite /var/cache/edb/sqlite-cache
Comment on attachment 32234 [details] initialize database >#!/bin/bash > >cat portage-sqlite-init-db.sql | sqlite /var/cache/edb/sqlite-cache2 cat portage-sqlite-init-db.sql | sqlite /var/cache/edb/sqlite-cache
Init.sh should create /var/cache/edb/sqlite-cache not sqlite-cache2 :)
Requirements: The module needs to be self-contained. It need to be able to create or alter the tables itself without user intervention.
Caching backend design will be changing in such a way that a backend will be queriable rather than just a glorified file system. Will integrate new backends at that time.