Author: fw
Date: 2005-09-15 15:12:34 +0000 (Thu, 15 Sep 2005)
New Revision: 2002
Modified:
lib/python/security_db.py
Log:
Increase database page size. Fix stupid bug in schema change handling.
Modified: lib/python/security_db.py
==================================================================---
lib/python/security_db.py 2005-09-15 15:05:18 UTC (rev 2001)
+++ lib/python/security_db.py 2005-09-15 15:12:34 UTC (rev 2002)
@@ -106,7 +106,6 @@
if self.verbose:
print "DB: schema version mismatch: expected %d, got
%d" \
% (self.schema_version, v)
- self.db.close()
raise SchemaMismatch, `v`
return
assert False
@@ -140,6 +139,11 @@
"""Creates the database schema."""
cursor = self.cursor()
+ # This gives us better performance (it''s usually the file
+ # system block size).
+
+ cursor.execute("PRAGMA page_size = 4096")
+
cursor.execute("""CREATE TABLE inodeprints
(file TEXT NOT NULL PRIMARY KEY,
inodeprint TEXT NOT NULL,
@@ -270,7 +274,7 @@
def do_parse(packages):
if self.verbose:
- print " parseFile: reading " + `filename`
+ print " reading " + `filename`
re_source = re.compile\
(r''^([a-zA-Z0-9.+-]+)(?:\s+\(([a-zA-Z0-9.+:-]+)\))?$'')