summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2020-04-02 19:05:14 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-05-27 07:34:08 +0100
commiteaa6de34442906ad6285aa069f17a7cb2a64e970 (patch)
tree9c8de0778302a34f996ca613594447ef44f7d797
parentbcd9ae6fbb2258787bdea260fed5663791353f5a (diff)
downloadopenembedded-core-eaa6de34442906ad6285aa069f17a7cb2a64e970.tar.gz
openembedded-core-eaa6de34442906ad6285aa069f17a7cb2a64e970.tar.bz2
openembedded-core-eaa6de34442906ad6285aa069f17a7cb2a64e970.zip
prservice.py: fix do_package with newer Python in Ubuntu 20.04
* with Ubuntu 20.04 which is using python 3.8 I'm seeing a lot of errors like: ERROR: libxml2-2.9.10-r0 do_package: Can NOT get PRAUTO, exception No module named '_sysconfigdata' not sure what caused this from python 3.8, but this seems to work * PRserv is enabled with: PRSERV_HOST = "localhost:0" (From OE-Core rev: 4b26eaf7152fb712aba47a0c746333578f58ee8d) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oe/prservice.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/lib/oe/prservice.py b/meta/lib/oe/prservice.py
index b1132ccb11..3a5ef8d921 100644
--- a/meta/lib/oe/prservice.py
+++ b/meta/lib/oe/prservice.py
@@ -3,6 +3,10 @@
#
def prserv_make_conn(d, check = False):
+ # Otherwise this fails when called from recipes which e.g. inherit python3native (which sets _PYTHON_SYSCONFIGDATA_NAME) with:
+ # No module named '_sysconfigdata'
+ if '_PYTHON_SYSCONFIGDATA_NAME' in os.environ:
+ del os.environ['_PYTHON_SYSCONFIGDATA_NAME']
import prserv.serv
host_params = list([_f for _f in (d.getVar("PRSERV_HOST") or '').split(':') if _f])
try: