Skip to contentSkip to conversation

Revert "prservice.py: fix do_package with newer Python in Ubuntu 20.04"

master Peter Kjellerstedt 2 participants 3 messages Jun 5, 2020 – Jun 9, 2020 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

This reverts commit 4b26eaf7152fb712aba47a0c746333578f58ee8d.

Since the problem occurred while importing prserv, the solution has been moved into it instead so it is solved for all cases where prserv is imported, most notably when using devtool.

---
 meta/lib/oe/prservice.py | 4 ----
 1 file changed, 4 deletions(-)
meta/lib/oe/prservice.py +0 -4
index 2d3c9c7e50..fcdbe66c19 100644
@@ -3,10 +3,6 @@
 #
 
 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:
#1 lore raw
Quoted 7 lines · Peter Kjellerstedt

This reverts commit 4b26eaf7152fb712aba47a0c746333578f58ee8d.

Since the problem occurred while importing prserv, the solution has been moved into it instead so it is solved for all cases where prserv is imported, most notably when using devtool.

I can see why you've done this however it really is a bit of a hack :(.

At least in this code its all together with the OE code which uses it. With it moved into bitbake, its moving "OE" knowledge over there and that worries me a lot as people won't find it when changing OE-Core.

Chris did have some ideas about this which seemed on the right track:

https://lists.yoctoproject.org/g/yocto/message/49571

although it seems that solution didn't work.

I'd like to better understand this issue before we merge things to bitbake.

Cheers,

Richard

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 18 lines · Richard Purdie via lists.openembedded.org
Quoted 8 lines · Peter Kjellerstedt

This reverts commit 4b26eaf7152fb712aba47a0c746333578f58ee8d.

Since the problem occurred while importing prserv, the solution has been moved into it instead so it is solved for all cases where prserv
is imported, most notably when using devtool.

I can see why you've done this however it really is a bit of a hack :(.

At least in this code its all together with the OE code which uses it.
With it moved into bitbake, its moving "OE" knowledge over there and that worries me a lot as people won't find it when changing OE-Core.

Quoted 8 lines

Chris did have some ideas about this which seemed on the right track:

https://lists.yoctoproject.org/g/yocto/message/49571

although it seems that solution didn't work.

I'd like to better understand this issue before we merge things to bitbake.

btw, the better question to ask is why is python3-native being used to execute bitbake code?

I think the wrong PATH is being used somewhere in devtool. The real fix is to track down where that is.

Cheers,

Richard