[MacPorts] #24310: python26 does not provide _bsddb

MacPorts noreply at macports.org
Fri Apr 9 06:42:23 PDT 2010


#24310: python26 does not provide _bsddb
----------------------------------+-----------------------------------------
 Reporter:  guy.linton@…          |       Owner:  blb@…           
     Type:  defect                |      Status:  new             
 Priority:  Normal                |   Milestone:                  
Component:  ports                 |     Version:  1.8.2           
 Keywords:                        |        Port:  python26        
----------------------------------+-----------------------------------------

Comment(by guy.linton@…):

 As you say, the bsddb module now seems to be available to python26.

 As you say, the problem is weird. The failure is reported here:

 {{{
         try:
             try:
                 self.dbstate.db.load(filename, self._pulse_progress,
                                      mode, upgrade=False)
             except gen.db.exceptions.DbUpgradeRequiredError, msg:
                 if QuestionDialog2(_("Need to upgrade database!"),
                                    str(msg),
                                    _("Upgrade now"),
                                    _("Cancel")).run():
                     self.dbstate.db.load(filename, self._pulse_progress,
                                          mode, upgrade=True)
                     self.dbstate.db.set_save_path(filename)
                 else:
                     self.dbstate.no_database()
         except gen.db.exceptions.DbVersionError, msg:
             self.dbstate.no_database()
             self._errordialog( _("Cannot open database"), str(msg))
         except OSError, msg:
             self.dbstate.no_database()
             self._errordialog(
                 _("Could not open file: %s") % filename, str(msg))
         except Errors.DbError, msg:
             self.dbstate.no_database()
             self._dberrordialog(msg)
         except Exception:
             self.dbstate.no_database()
 }}}

 Where _dberrordialog is being called. The msg attached is:

 DB_RUNRECOVERY: Fatal error, run database recovery -- process-private:
 unable to find environment

 It doesn't seem to be that the database is corrupt, but rather that
 something is wrong with the 'environment'. Do you have any ideas what
 dbload may be trying to say. What is this environment it is trying to
 find?

 db46_recover doesn't seem to make any difference.

 There are known incompatibilities between the databases in Gramps 3.1 and
 Gramps 3.2. These are due to a mistake in Gramps about block size (or
 something like that). The work-around is to export the database from 3.1
 (in a Gramps format) and then import into 3.2. The problem has now been
 fixed in a forthcoming release of Gramps.

 So, I have tried importing the Gramps dump into a fresh python26 database,
 and that works OK. Switching back to python25 gives a message about
 database corruption (not the same environment message).

 However, when I run Gramps with python26, I get the slow running reported
 in [http://www.gramps-project.org/bugs/view.php?id=3750]. I don't think
 the switch to the more recent database is possible because there is no
 Macports version of it.

 There is clearly a difference between the behaviour of

 {{{
 5316156  520 -rwxr-xr-x    2 root     wheel      263404 Mar 21 22:12
 ./local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5
 /lib-dynload/_bsddb.so
 6113516  640 -rwxr-xr-x    2 root     wheel      325416 Apr  8 22:44
 ./local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /lib-dynload/_bsddb.so
 }}}

 In conclusion
 (1) Any idea how I could find out what the problem with switching between
 the two different implementations of _bsddb.so is? (At least in one
 direction, it seems to be that the location of the environment is lost).
 (2) The python 2.6 version of the database is slow.

-- 
Ticket URL: <http://trac.macports.org/ticket/24310#comment:14>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list