Size of registry? (And sqlite questions)
Michael_google gmail_Gersten
keybounce at gmail.com
Fri Jul 2 10:43:40 PDT 2010
Ok, I'm trying to shrink the macports sql database.
I made a copy of the db, and then tried this:
Kleiman-ibook:tmp michael$ sqlite3 foo.db ".dump" > redo.sql
Kleiman-ibook:tmp michael$ touch new.db
Kleiman-ibook:tmp michael$ sqlite3 new.db < redo.sql
Error: near line 6: no such collation sequence: VERSION
Error: near line 7: no such table: ports
Error: near line 8: no such table: ports
Error: near line 9: no such table: ports
Error: near line 10: no such table: ports
Error: near line 3414: no such table: sqlite_sequence
Error: near line 3415: no such table: sqlite_sequence
Error: near line 3416: no such table: main.ports
Error: near line 3417: no such table: main.ports
Error: near line 3418: no such table: main.ports
Kleiman-ibook:tmp michael$ sqlite3 foo.db ".dump" | head
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE metadata (key UNIQUE, value);
INSERT INTO "metadata" VALUES('version',1.0);
INSERT INTO "metadata" VALUES('created','1276926419');
CREATE TABLE ports (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT
COLLATE NOCASE, portfile CLOB, url TEXT, location TEXT, epoch INTEGER,
version TEXT COLLATE VERSION, revision INTEGER, variants TEXT,
negated_variants TEXT, state TEXT, date DATETIME, installtype TEXT,
archs TEXT, requested INT, os_platform TEXT, os_major INTEGER, UNIQUE
(name, epoch, version, revision, variants), UNIQUE (url, epoch,
version, revision, variants));
INSERT INTO "ports"
VALUES(137,'ncurses','',NULL,'/opt/local/var/macports/software/ncurses/5.7_0+universal',0,'5.7',0,'+universal','','installed',1268287431,'image','',0,'','');
So we've got the tables being created, yet complaints about no such table.
... And why the complaint about VERSION when it is generating VERSION
in the dump?
More information about the macports-users
mailing list