diff options
author | Changqing Li <changqing.li@windriver.com> | 2019-07-02 09:58:07 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-07-10 09:28:20 -0700 |
commit | 6207331f37679e81fcfa6b757e5d6f3f631d57f6 (patch) | |
tree | 561c2eea451bfa2f9d7d6488231f8b3fef1f34cd /meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch | |
parent | 517f7ba99ce9437ece3487f14aefa2d416cfb0a3 (diff) | |
download | meta-openembedded-contrib-6207331f37679e81fcfa6b757e5d6f3f631d57f6.tar.gz |
libldb: upgrade 1.4.1 -> 1.5.4
1. switch to python3
2. add cross-answer for lmdb check, so remove patch 0001-libldb-fix-config-error
3. fix cross-compile problem caused by waf
4. refresh patch
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch')
-rw-r--r-- | meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch b/meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch index ee4936a5aa..3f2921ed33 100644 --- a/meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch +++ b/meta-networking/recipes-support/libldb/libldb/do-not-import-target-module-while-cross-compile.patch @@ -1,30 +1,32 @@ -From f4cda3a71311e4496b725bc5f46af93413ec7a1c Mon Sep 17 00:00:00 2001 -From: Bian Naimeng <biannm@cn.fujitsu.com> -Date: Fri, 17 Jul 2015 11:58:49 +0800 -Subject: [PATCH] libldb: add new recipe +From cc0576405803bcae45ee353c4333c449cead9207 Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Tue, 25 Jun 2019 14:25:08 +0800 +Subject: [PATCH] do not import target module while cross compile -Some modules such as dynamic library maybe cann't be imported while cross compile, -we just check whether does the module exist. +Some modules such as dynamic library maybe cann't be imported +while cross compile, we just check whether does the module exist. Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> +update to version 4.10.5, and switch to python3 +Signed-off-by: Changqing Li <changqing.li@windriver.com> --- - buildtools/wafsamba/samba_bundled.py | 32 ++++++++++++++++++++++++-------- - 1 file changed, 24 insertions(+), 8 deletions(-) + buildtools/wafsamba/samba_bundled.py | 27 +++++++++++++++++++-------- + 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py -index 253d604..398cc6a 100644 +index 60ce7da..5468a36 100644 --- a/buildtools/wafsamba/samba_bundled.py +++ b/buildtools/wafsamba/samba_bundled.py -@@ -2,6 +2,7 @@ +@@ -4,6 +4,7 @@ import sys + from waflib import Build, Options, Logs + from waflib.Configure import conf + from wafsamba import samba_utils ++import importlib.util, os - import sys - import Build, Options, Logs -+import imp, os - from Configure import conf - from samba_utils import TO_LIST - -@@ -249,17 +250,32 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'): + def PRIVATE_NAME(bld, name, private_extension, private_library): + '''possibly rename a library to include a bundled extension''' +@@ -249,17 +250,27 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'): # versions minversion = minimum_library_version(conf, libname, minversion) @@ -34,34 +36,32 @@ index 253d604..398cc6a 100644 - found = False - else: + # Find module in PYTHONPATH -+ stuff = imp.find_module(modulename, [os.environ["PYTHONPATH"]]) -+ if stuff: ++ spec = importlib.util._find_spec_from_path(modulename, [os.environ["PYTHONPATH"]]) ++ if spec: try: - version = m.__version__ - except AttributeError: -+ m = imp.load_module(modulename, stuff[0], stuff[1], stuff[2]) ++ module = importlib.util.module_from_spec(spec) ++ spec.loader.load_module(module) + except ImportError: found = False + + if conf.env.CROSS_COMPILE: + # Some modules such as dynamic library maybe cann't be imported + # while cross compile, we just check whether the module exist -+ Logs.warn('Cross module[%s] has been found, but can not be loaded.' % (stuff[1])) ++ Logs.warn('Cross module[%s] has been found, but can not be loaded.' % (spec.name)) + found = True else: - found = tuplize_version(version) >= tuplize_version(minversion) + try: -+ version = m.__version__ ++ version = module.__version__ + except AttributeError: + found = False + else: + found = tuplize_version(version) >= tuplize_version(minversion) -+ finally: -+ if stuff[0]: -+ stuff[0].close() -+ else: -+ found = False -+ if not found and not conf.LIB_MAY_BE_BUNDLED(libname): Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion)) sys.exit(1) +-- +2.7.4 + |