updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / python25-db47 / python-2.5.2-db47.patch
blob5dd3af20a16bfda1a196beb24f41da88aec1f5fc
1 diff -ru Python-2.5.2-orig/Modules/_bsddb.c Python-2.5.2/Modules/_bsddb.c
2 --- Python-2.5.2-orig/Modules/_bsddb.c 2008-02-03 02:26:23.000000000 -0500
3 +++ Python-2.5.2/Modules/_bsddb.c 2008-09-24 17:01:50.000000000 -0400
4 @@ -5335,11 +5335,13 @@
5 DBEnv_getattr(DBEnvObject* self, char *name)
7 if (!strcmp(name, "db_home")) {
8 + const char *home = NULL;
9 CHECK_ENV_NOT_CLOSED(self);
10 - if (self->db_env->db_home == NULL) {
11 + self->db_env->get_home(self->db_env, &home);
12 + if (home == NULL) {
13 RETURN_NONE();
15 - return PyString_FromString(self->db_env->db_home);
16 + return PyString_FromString(home);
19 return Py_FindMethod(DBEnv_methods, (PyObject* )self, name);
20 @@ -5961,22 +5963,37 @@
21 ADD_INT(d, DB_TIME_NOTGRANTED);
22 ADD_INT(d, DB_TXN_NOT_DURABLE);
23 ADD_INT(d, DB_TXN_WRITE_NOSYNC);
24 - ADD_INT(d, DB_LOG_AUTOREMOVE);
25 - ADD_INT(d, DB_DIRECT_LOG);
26 ADD_INT(d, DB_DIRECT_DB);
27 ADD_INT(d, DB_INIT_REP);
28 ADD_INT(d, DB_ENCRYPT);
29 ADD_INT(d, DB_CHKSUM);
30 #endif
32 +#if (DBVER >= 42) && (DBVER < 47)
33 + ADD_INT(d, DB_LOG_AUTOREMOVE);
34 + ADD_INT(d, DB_DIRECT_LOG);
35 +#endif
37 +#if (DBVER >= 47)
38 + ADD_INT(d, DB_LOG_DIRECT);
39 + ADD_INT(d, DB_LOG_DSYNC);
40 + ADD_INT(d, DB_LOG_IN_MEMORY);
41 + ADD_INT(d, DB_LOG_AUTO_REMOVE);
42 + ADD_INT(d, DB_LOG_ZERO);
43 +#endif
45 #if (DBVER >= 43)
46 - ADD_INT(d, DB_LOG_INMEMORY);
47 ADD_INT(d, DB_BUFFER_SMALL);
48 ADD_INT(d, DB_SEQ_DEC);
49 ADD_INT(d, DB_SEQ_INC);
50 ADD_INT(d, DB_SEQ_WRAP);
51 #endif
53 +#if (DBVER >= 43) && (DBVER < 47)
54 + ADD_INT(d, DB_LOG_INMEMORY);
55 + ADD_INT(d, DB_DSYNC_LOG);
56 +#endif
58 #if (DBVER >= 41)
59 ADD_INT(d, DB_ENCRYPT_AES);
60 ADD_INT(d, DB_AUTO_COMMIT);
61 diff -ru Python-2.5.2-orig/setup.py Python-2.5.2/setup.py
62 --- Python-2.5.2-orig/setup.py 2008-09-24 17:01:02.000000000 -0400
63 +++ Python-2.5.2/setup.py 2008-09-24 17:03:05.000000000 -0400
64 @@ -608,12 +608,12 @@
65 # a release. Most open source OSes come with one or more
66 # versions of BerkeleyDB already installed.
68 - max_db_ver = (4, 5)
69 + max_db_ver = (4, 7)
70 # NOTE: while the _bsddb.c code links against BerkeleyDB 4.6.x
71 # we leave that version disabled by default as it has proven to be
72 # quite a buggy library release on many platforms.
73 min_db_ver = (3, 3)
74 - db_setup_debug = False # verbose debug prints from this script?
75 + db_setup_debug = True # verbose debug prints from this script?
77 # construct a list of paths to look for the header file in on
78 # top of the normal inc_dirs.