@@ -630,16 +630,15 @@ def detect_modules(self):
630630 # implementation independent wrapper for these; dumbdbm.py provides
631631 # similar functionality (but slower of course) implemented in Python.
632632
633- # Sleepycat^WOracle Berkeley DB interface. http://www.sleepycat.com
633+ # Sleepycat^WOracle Berkeley DB interface.
634+ # http://www.oracle.com/database/berkeley-db/db/index.html
634635 #
635636 # This requires the Sleepycat^WOracle DB code. The supported versions
636- # are set below. Visit http://www.sleepycat.com/ to download
637+ # are set below. Visit the URL above to download
637638 # a release. Most open source OSes come with one or more
638639 # versions of BerkeleyDB already installed.
639640
640- # XXX(gps) - Do not allow BerkeleyDB 4.6.x until Oracle fixes
641- # the DB_HASH lockup bug that is present in 4.6.19.
642- max_db_ver = (4 , 5 )
641+ max_db_ver = (4 , 6 )
643642 min_db_ver = (3 , 3 )
644643 db_setup_debug = False # verbose debug prints from this script?
645644
@@ -710,6 +709,15 @@ class db_found(Exception): pass
710709 db_minor = int (m .group (1 ))
711710 db_ver = (db_major , db_minor )
712711
712+ # Avoid 4.6 prior to 4.6.21 due to a BerkeleyDB bug
713+ if db_ver == (4 , 6 ):
714+ m = re .search (r"#define\WDB_VERSION_PATCH\W(\d+)" , f )
715+ db_patch = int (m .group (1 ))
716+ if db_patch < 21 :
717+ print ("db.h:" , db_ver , "patch" , db_patch ,
718+ "being ignored (4.6.x must be >= 4.6.21)" )
719+ continue
720+
713721 if ( (db_ver not in db_ver_inc_map ) and
714722 (db_ver <= max_db_ver and db_ver >= min_db_ver ) ):
715723 # save the include directory with the db.h version
0 commit comments