Size of registry? (And sqlite questions)

Rainer Müller raimue at macports.org
Tue Jul 6 06:16:06 PDT 2010


On 2010-07-02 19:55 , Scott Haneda wrote:
> On Jul 2, 2010, at 10:22 AM, Michael_google gmail_Gersten wrote:
> 
>>>> Nor did I see any .compact command in sqlite3.
>>>
>>> I am not sure exactly what your other comments are about, I have not yet had a chance to learn about the new features of MacPorts, so I will leave it to just the above comment...
>>>
>>> I believe, if memory servers me correctly from trying to shrink my Apple Mail data store, it is vacuum that you are looking for. http://www.sqlite.org/lang_vacuum.html
>>
>> Alright, can you explain this:
>>
>> sqlite> vacuum;
>> Error: no such collation sequence: VERSION
> 
> I get the same error.  Researching this a little I think one of the tables has a collating sequence defined that no longer exists.  I believe this is a very small bug and probably needs to be looked into. 

It is not quite a bug, MacPorts defines a custom collation for the
version column. This requires that you load an extension to work with
the sqlite registry directly. This is not intended for everyone and
should only be used by the experienced and curious users as you could
damage your registry with a wrong collation.

This extension is build as part of MacPorts base and can be found in
src/cregistry/macports.sqlext after building. Note that this file is not
being installed, so you really need to build from source.

$ sudo sqlite3 /opt/local/var/macports/registry/registry.db
Password:
SQLite version 3.6.23.1
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .load
/Users/.../path/.../to/.../src/macports/trunk/base/src/cregistry/macports.sqlext
sqlite> VACUUM;
sqlite>

HTH,
Rainer


More information about the macports-users mailing list