hg: Add python3-native to native paths
PATCH 1/1 hg: Add python3-native to native paths
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.
--- lib/bb/fetch2/hg.py | 1 + 1 file changed, 1 insertion(+)
lib/bb/fetch2/hg.py +1 -0
@@ -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)
Signature · 1 line
2.24.0
EXTRANATIVEPATH is an oe-core-ism, not bitbake, so this isn’t an appropriate place for it. Perhaps in do_fetch in base.bbclass.
Quoted 33 lines · On Nov 27, 2019, 9:10 PM -0700, Khem Raj <[email protected]>, wrote:
This helps fix an issue where python interpreter in hg script could overflow the
BINPRM_BUF_SIZEwhich 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/envpython3' and it will ensure that python3 from native install is used instead of the one on host.Signed-off-by Khem Raj <[email protected]>---
lib/bb/fetch2/hg.py| 1 +1 file changed, 1 insertion(+)lib/bb/fetch2/hg.py +0
-0@@ -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/envhg"
ud.setup_revisions(d)
--
2.24.0--
_______________________________________________
bitbake-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/bitbake-devel
Quoted 3 lines · Christopher Larson
EXTRANATIVEPATH is an oe-core-ism, not bitbake, so this isn’t an appropriate place for it. Perhaps in
do_fetchin base.bbclass.
Perhaps a better idea thanks
Quoted 36 lines · On Nov 27, 2019, 9:10 PM -0700, Khem Raj <[email protected]>, wrote:
This helps fix an issue where python interpreter in hg script could overflow the
BINPRM_BUF_SIZEwhich 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/envpython3' and it will ensure that python3 from native install is used instead of the one on host.Signed-off-by Khem Raj <[email protected]>---
lib/bb/fetch2/hg.py| 1 +1 file changed, 1 insertion(+)lib/bb/fetch2/hg.py +0
-0@@ -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/envhg"
ud.setup_revisions(d)
--
2.24.0--
_______________________________________________
bitbake-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/bitbake-devel