All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hg: Add python3-native to native paths
@ 2019-11-28  4:09 Khem Raj
  2019-11-28 21:20 ` Christopher Larson
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2019-11-28  4:09 UTC (permalink / raw)
  To: bitbake-devel

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@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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] hg: Add python3-native to native paths
  2019-11-28  4:09 [PATCH] hg: Add python3-native to native paths Khem Raj
@ 2019-11-28 21:20 ` Christopher Larson
  2019-11-28 22:12   ` Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Christopher Larson @ 2019-11-28 21:20 UTC (permalink / raw)
  To: bitbake-devel, Khem Raj

[-- Attachment #1: Type: text/plain, Size: 1413 bytes --]

EXTRANATIVEPATH is an oe-core-ism, not bitbake, so this isn’t an appropriate place for it. Perhaps in do_fetch in base.bbclass.
On Nov 27, 2019, 9:10 PM -0700, Khem Raj <raj.khem@gmail.com>, wrote:
> 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@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
>
> --
> _______________________________________________
> bitbake-devel mailing list
> bitbake-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/bitbake-devel

[-- Attachment #2: Type: text/html, Size: 1911 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] hg: Add python3-native to native paths
  2019-11-28 21:20 ` Christopher Larson
@ 2019-11-28 22:12   ` Khem Raj
  0 siblings, 0 replies; 3+ messages in thread
From: Khem Raj @ 2019-11-28 22:12 UTC (permalink / raw)
  To: Christopher Larson; +Cc: bitbake-devel

[-- Attachment #1: Type: text/plain, Size: 1546 bytes --]

On Thu, Nov 28, 2019 at 1:20 PM Christopher Larson <kergoth@gmail.com>
wrote:

> EXTRANATIVEPATH is an oe-core-ism, not bitbake, so this isn’t an
> appropriate place for it. Perhaps in do_fetch in base.bbclass.
>

Perhaps a better idea thanks

On Nov 27, 2019, 9:10 PM -0700, Khem Raj <raj.khem@gmail.com>, wrote:
>
> 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@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
>
> --
> _______________________________________________
> bitbake-devel mailing list
> bitbake-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/bitbake-devel
>
>

[-- Attachment #2: Type: text/html, Size: 2744 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-28 22:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-28  4:09 [PATCH] hg: Add python3-native to native paths Khem Raj
2019-11-28 21:20 ` Christopher Larson
2019-11-28 22:12   ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.