Changes

Jump to: navigation, search

Install latest BSDDB

241 bytes removed, 21:56, 24 January 2013
m
Gramps
Some people have encountered bugs in GRAMPS Gramps which are due to the database not working well.
Installing the latest version of the BSDDB database tends to solve the problem.
 
'''This guide is for version {{version}} of Gramps, for earlier versions, you need to manually change python files!'''
== Why install latest version ? ==
Some errors have happened in the past outside of GRAMPSGramps, with the BSDDB database format GRAMPS Gramps uses. See egBugs: [http://www.gramps-project.org/bugs/view.php?id={{bug|110 Bug # 110], [http://www.gramps-project.org/bugs/view.php?id=814 Bug # }} and {{bug|814]}}
It can be expected that recompiling BSDDB could solve the problem. However, if BSDDB needs to be recompiled, one can as well install the latest version.
Furthermore, the people of pybsddb recommend doing a local compile if the use of BSDDB is critical.
For genealogists needing GRAMPS Gramps this could be considered true.
== Before you begin: BACKUP ==
Take a backup of your genealogical data before you do this. Remember, you should backup data of GRAMPS Gramps in .gramps format, and keep that somewhere save (GRDB format is NOT a good backup format!).
== Obtaining latest BSDDB version ==
Download the version compatible with the downloaded bsddb version, eg [http://pypi.python.org/pypi/bsddb3/5.1.1 bsddb3 5.1.1] is tested with 4.2 and 5.1. Unpack and go in the created directory. Run <code>python setup.py</code>, this should find your installed bsddb3 returning something like:
Found BerkeleyDB 4Berkeley DB 5.5 1 installation. include files in /usr/local/BerkeleyDB.45.51/include library files in /usr/local/BerkeleyDB.45.51/lib library name is libdb-45.51
Now run <code>python setup.py build</code> to make the package, and lastly install it with <pre>sudo python setup.py install</pre> which installs bsddb3.
Note: you need libpython2.5x-devel to buildthis, with x your version of python.You can As a test with , run  python test >>> import bsddb3 >>> bsddb3.__version__ '5.1.1' >>> bsddb3.db.version() (5, 1, 19) === Make Gramps use bsddb3===In version {{stable_branch}}, you can make Gramps use the bsddb3 package by setting a config key.pyFor this, but that does not work on my AMD64open the ini file:  ~/.gramps/gramps{{stable_branch}}/gramps.ini and look for the line   ;;use-bsddb3=False
=== Remove old BSDDB and replace with new in GRAMPS===* Go Change this line into the GRAMPS directory* Open the following files: /gramps-2.2.8/src/DbLoader.py /gramps-2.2.8/src/Editors/_EditFamily.py /gramps-2.2.8/src/GrampsDb/_GrampsBSDDB.py /gramps-2.2.8/src/GrampsDb/_GrampsDbBase.py /gramps-2.2.8/src/GrampsDb/_GrampsDBCallback.py /gramps-2.2.8/src/GrampsDb/_ReadGedcom.py /gramps-2.2.8/src/GrampsLogger/_ErrorReportAssistant.py /gramps-2.2.8/src/plugins/Leak.py
* In these files, look up the line import bsddb:Change this line into import use-bsddb3=True
'''The above requires further testing!!!'''If you now start Gramps, bsddb3 will be used.
== Test ==
You should now have GRAMPS use the latest BSDDB version. Test if all works
== External Link ==
*[http://docs.python.org/library/bsddb.html bsddb — Interface to Berkeley DB library — Python v2.6.1 documentation]
*[http://pybsddb.sourceforge.net/ref/intro/data.html Berkeley DB Reference Guide: An introduction to data management]
*[[Database Formats]] - GRAMPSGramps
[[Category:Developers/General]]

Navigation menu