python: Fix to support the python module _bsddb built with db 5.3

_bsddb module in python 2.7 could be built only with db version
between 4.1 and 4.7. A patch was added to avoid build warning
about this for [YOCTO #1937] but not actually fixed it.

This patch enable _bsddb module be built with db 5.3, and remove
--disable-statistics from the DB5_CONFIG to fix segmentation fault
when using _bsddb module in python.

[YOCTO #2749]

(From OE-Core rev: 11267f8a1ccf65142988b095351a84b0fa0fcbcf)

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Jackie Huang 2012-08-04 21:14:08 +08:00 committed by Richard Purdie
parent 941d107053
commit 77625e728b
5 changed files with 1597 additions and 27 deletions

View File

@ -1,23 +0,0 @@
_bsddb module can be built only with db version between 4.1 and 4.7.
Avoid a warning by not adding this module to missing variable.
Upstream-Status: Inappropriate [distribution]
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Index: Python-2.7.2/setup.py
===================================================================
--- Python-2.7.2.orig/setup.py 2012-04-05 23:16:49.268139840 +0300
+++ Python-2.7.2/setup.py 2012-04-05 23:17:30.912138622 +0300
@@ -1024,7 +1024,9 @@
db_incs = None
dblibs = []
dblib_dir = None
- missing.append('_bsddb')
+ # We need db version between 4.1 and 4.7
+ # Avoid this warning
+ #missing.append('_bsddb')
# The sqlite interface
sqlite_setup_debug = False # verbose debug prints from this script?

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,22 @@
Remove the RPTH to avoid QA issue warning.
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
setup.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/setup.py b/setup.py
index 83b5e56..1fd5487 100644
--- a/setup.py
+++ b/setup.py
@@ -1025,7 +1025,6 @@ class PyBuildExt(build_ext):
exts.append(Extension('_bsddb', ['_bsddb.c'],
depends = ['bsddb.h'],
library_dirs=dblib_dir,
- runtime_library_dirs=dblib_dir,
include_dirs=db_incs,
libraries=dblibs))
else:
--
1.7.4

View File

@ -1,6 +1,6 @@
require python.inc
DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib"
PR = "${INC_PR}.1"
PR = "${INC_PR}.2"
DISTRO_SRC_URI ?= "file://sitecustomize.py"
DISTRO_SRC_URI_linuxstdbase = ""
@ -23,9 +23,10 @@ SRC_URI += "\
file://setuptweaks.patch \
file://check-if-target-is-64b-not-host.patch \
file://search_db_h_in_inc_dirs_and_avoid_warning.patch \
file://avoid_warning_about_bsddb.patch \
file://avoid_warning_about_tkinter.patch \
file://avoid_warning_for_sunos_specific_module.patch \
file://python-2.7.3-berkeley-db-5.3.patch \
file://python-2.7.3-remove-bsdb-rpath.patch \
"
S = "${WORKDIR}/Python-${PV}"

View File

@ -14,7 +14,7 @@ HOMEPAGE = "http://www.oracle.com/technology/products/berkeley-db/db/index.html"
LICENSE = "Sleepycat"
VIRTUAL_NAME ?= "virtual/db"
RCONFLICTS_${PN} = "db3"
PR = "r7"
PR = "r8"
SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
SRC_URI += "file://arm-thumb-mutex_db5.patch;patchdir=.."
@ -56,7 +56,7 @@ FILES_SOLIBSDEV = "${libdir}/libdb.so"
#configuration - set in local.conf to override
# All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix)
DB5_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-statistics --disable-verify --disable-compat185 --disable-sql"
DB5_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-verify --disable-compat185 --disable-sql"
EXTRA_OECONF = "${DB5_CONFIG}"