Re: [greenstone-devel] configuration problem

From Katherine Don
DateMon, 09 Jan 2006 12:41:03 +1300
Subject Re: [greenstone-devel] configuration problem
In-Reply-To (43C19AA6-9000502-dlconsulting-co-nz)

Just to add to what Richard wrote, for MGPP collections you only need to
rebuild the gdbm database. But for MG collections, a bug only recently
discovered (and fixed after the release of 2.62) means that you need to
rebuild the whole collection when transferring to a different endian


Richard Managh wrote:
> Hi Rich,
> Just to add to what Stephen wrote,
> When you upload the collection to your mac, the only part of the
> collection that is affected by the endian problem is the gdbm database.
> The mg indexes in the collection and the associated files will be fine.
> A quick way of dealing with the gdbm database is to use two utilities
> provided with greenstone, db2txt and txt2db
> db2txt - converts the gdbm database for a collection from binary form to
> text form
> txt2db - converts the gdbm database for a collection from text form back
> to binary form
> You can find the gdbm database for a collection in that collections
> index/text directory.
> It will be named as a *.ldb file, or a *.bdb file, the l stands for
> little endian, the b stands for big endian. So on a windows machine, if
> you had a built collection with the name "apples", you would find a
> apples.ldb file here: gsdlcollectapplesindex extapples.ldb
> So, to successfully transfer your gdbm database from a windows machine
> to a mac, you would need to use the db2txt utility on the windows
> machine, to convert the *.ldb file to a text form, something like this
> db2txt apples.ldb > apples.ldb.txt
> Once you have uploaded that ldb file to the mac, you can use the mac's
> version of txt2db to convert your text version back to a *.bdb file in
> this case, something like
> txt2db apples.ldb.txt > apples.bdb
> Put this file in the index/text directory, and your collection should
> work properly on the mac.
> Hope this helps,
> Richard