[bitbake-devel] [PATCH] hg: Add python3-native to native paths

Khem Raj raj.khem at gmail.com
Thu Nov 28 04:09:47 UTC 2019


This helps fix an issue where python interpreter in hg script could
overflow the BINPRM_BUF_SIZE which is 128 on most of systems, because
interpreter is hardcoded and build paths can be deep.

This patch helps, because now the absolute python interp path in hg can
be replaced with '/usr/bin/env python3' and it will ensure that python3
from native install is used instead of the one on host.

Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 lib/bb/fetch2/hg.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/bb/fetch2/hg.py b/lib/bb/fetch2/hg.py
index e21115de..a640a80c 100644
--- a/lib/bb/fetch2/hg.py
+++ b/lib/bb/fetch2/hg.py
@@ -65,6 +65,7 @@ class Hg(FetchMethod):
         ud.pkgdir = os.path.join(hgdir, hgsrcname)
         ud.moddir = os.path.join(ud.pkgdir, ud.module)
         ud.localfile = ud.moddir
+        d.appendVar("EXTRANATIVEPATH", " python3-native ")
         ud.basecmd = d.getVar("FETCHCMD_hg") or "/usr/bin/env hg"
 
         ud.setup_revisions(d)
-- 
2.24.0



More information about the bitbake-devel mailing list