public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v1 0/1] Fixing BaseTool build break
@ 2022-09-21 20:44 Kun Qin
  2022-09-21 20:44 ` [PATCH v1 1/1] BaseTools: Edk2ToolsBuild: Fixing pipeline build due to path too long Kun Qin
  0 siblings, 1 reply; 6+ messages in thread
From: Kun Qin @ 2022-09-21 20:44 UTC (permalink / raw)
  To: devel; +Cc: Bob Feng, Liming Gao, Yuwei Chen, Sean Brogan

Currently the BaseTool build step is failing and caused the pipeline to
malfunciton.

The issue is due to the environment path too long during the build
process and adding VC toolchain path to the environment variable will
fail due to Windows varaible length limit.

Patch v1 branch: https://github.com/kuqin12/edk2/tree/fix_edk2_build

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>

Sean Brogan (1):
  BaseTools: Edk2ToolsBuild: Fixing pipeline build due to path too long

 BaseTools/Edk2ToolsBuild.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.37.1.windows.1


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

* [PATCH v1 1/1] BaseTools: Edk2ToolsBuild: Fixing pipeline build due to path too long
  2022-09-21 20:44 [PATCH v1 0/1] Fixing BaseTool build break Kun Qin
@ 2022-09-21 20:44 ` Kun Qin
  2022-09-21 23:09   ` [edk2-devel] " Sean
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Kun Qin @ 2022-09-21 20:44 UTC (permalink / raw)
  To: devel; +Cc: Bob Feng, Liming Gao, Yuwei Chen, Sean Brogan

From: Sean Brogan <sean.brogan@microsoft.com>

Current implementation of looking up toolchain will _insert_ the findings
from vsvarsall.bat to existing path and potentially stuff the variable to
exceed the length of maximal path length accepted by Windows.

This change updated the logic to use the discovered shell varialbes to
replace the existing path, which is desirable in the specific use case.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>

Co-authored-by: Sean Brogan <sean.brogan@microsoft.com>
Signed-off-by: Kun Qin <kuqin12@gmail.com>
---
 BaseTools/Edk2ToolsBuild.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Edk2ToolsBuild.py b/BaseTools/Edk2ToolsBuild.py
index 1ea8187de693..f862468ce275 100644
--- a/BaseTools/Edk2ToolsBuild.py
+++ b/BaseTools/Edk2ToolsBuild.py
@@ -122,7 +122,7 @@ class Edk2ToolsBuild(BaseAbstractInvocable):
             for key in vc_vars.keys():
                 logging.debug(f"Var - {key} = {vc_vars[key]}")
                 if key.lower() == 'path':
-                    shell_env.insert_path(vc_vars[key])
+                    shell_env.set_path(vc_vars[key])
                 else:
                     shell_env.set_shell_var(key, vc_vars[key])
 
-- 
2.37.1.windows.1


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

* Re: [edk2-devel] [PATCH v1 1/1] BaseTools: Edk2ToolsBuild: Fixing pipeline build due to path too long
  2022-09-21 20:44 ` [PATCH v1 1/1] BaseTools: Edk2ToolsBuild: Fixing pipeline build due to path too long Kun Qin
@ 2022-09-21 23:09   ` Sean
  2022-09-22 11:11   ` Bob Feng
       [not found]   ` <17172A4739518A26.13460@groups.io>
  2 siblings, 0 replies; 6+ messages in thread
From: Sean @ 2022-09-21 23:09 UTC (permalink / raw)
  To: devel, kuqin12; +Cc: Bob Feng, Liming Gao, Yuwei Chen, Sean Brogan

Reviewed-by:  Sean Brogan <sean.brogan@microsoft.com>


On 9/21/2022 1:44 PM, Kun Qin wrote:
> From: Sean Brogan <sean.brogan@microsoft.com>
>
> Current implementation of looking up toolchain will _insert_ the findings
> from vsvarsall.bat to existing path and potentially stuff the variable to
> exceed the length of maximal path length accepted by Windows.
>
> This change updated the logic to use the discovered shell varialbes to
> replace the existing path, which is desirable in the specific use case.
>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
>
> Co-authored-by: Sean Brogan <sean.brogan@microsoft.com>
> Signed-off-by: Kun Qin <kuqin12@gmail.com>
> ---
>   BaseTools/Edk2ToolsBuild.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/BaseTools/Edk2ToolsBuild.py b/BaseTools/Edk2ToolsBuild.py
> index 1ea8187de693..f862468ce275 100644
> --- a/BaseTools/Edk2ToolsBuild.py
> +++ b/BaseTools/Edk2ToolsBuild.py
> @@ -122,7 +122,7 @@ class Edk2ToolsBuild(BaseAbstractInvocable):
>               for key in vc_vars.keys():
>
>                   logging.debug(f"Var - {key} = {vc_vars[key]}")
>
>                   if key.lower() == 'path':
>
> -                    shell_env.insert_path(vc_vars[key])
>
> +                    shell_env.set_path(vc_vars[key])
>
>                   else:
>
>                       shell_env.set_shell_var(key, vc_vars[key])
>
>   
>

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

* Re: [PATCH v1 1/1] BaseTools: Edk2ToolsBuild: Fixing pipeline build due to path too long
  2022-09-21 20:44 ` [PATCH v1 1/1] BaseTools: Edk2ToolsBuild: Fixing pipeline build due to path too long Kun Qin
  2022-09-21 23:09   ` [edk2-devel] " Sean
@ 2022-09-22 11:11   ` Bob Feng
       [not found]   ` <17172A4739518A26.13460@groups.io>
  2 siblings, 0 replies; 6+ messages in thread
From: Bob Feng @ 2022-09-22 11:11 UTC (permalink / raw)
  To: Kun Qin, devel@edk2.groups.io; +Cc: Gao, Liming, Chen, Christine, Sean Brogan

Reviewed-by: Bob Feng <bob.c.feng@intel.com>

-----Original Message-----
From: Kun Qin <kuqin12@gmail.com> 
Sent: Thursday, September 22, 2022 4:45 AM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>; Sean Brogan <sean.brogan@microsoft.com>
Subject: [PATCH v1 1/1] BaseTools: Edk2ToolsBuild: Fixing pipeline build due to path too long

From: Sean Brogan <sean.brogan@microsoft.com>

Current implementation of looking up toolchain will _insert_ the findings from vsvarsall.bat to existing path and potentially stuff the variable to exceed the length of maximal path length accepted by Windows.

This change updated the logic to use the discovered shell varialbes to replace the existing path, which is desirable in the specific use case.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>

Co-authored-by: Sean Brogan <sean.brogan@microsoft.com>
Signed-off-by: Kun Qin <kuqin12@gmail.com>
---
 BaseTools/Edk2ToolsBuild.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Edk2ToolsBuild.py b/BaseTools/Edk2ToolsBuild.py index 1ea8187de693..f862468ce275 100644
--- a/BaseTools/Edk2ToolsBuild.py
+++ b/BaseTools/Edk2ToolsBuild.py
@@ -122,7 +122,7 @@ class Edk2ToolsBuild(BaseAbstractInvocable):
             for key in vc_vars.keys():                 logging.debug(f"Var - {key} = {vc_vars[key]}")                 if key.lower() == 'path':-                    shell_env.insert_path(vc_vars[key])+                    shell_env.set_path(vc_vars[key])                 else:                     shell_env.set_shell_var(key, vc_vars[key]) -- 
2.37.1.windows.1


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

* Re: [edk2-devel] [PATCH v1 1/1] BaseTools: Edk2ToolsBuild: Fixing pipeline build due to path too long
       [not found]   ` <17172A4739518A26.13460@groups.io>
@ 2022-09-22 11:26     ` Bob Feng
  2022-09-23  4:42       ` Kun Qin
  0 siblings, 1 reply; 6+ messages in thread
From: Bob Feng @ 2022-09-22 11:26 UTC (permalink / raw)
  To: devel@edk2.groups.io, Feng, Bob C, Kun Qin
  Cc: Gao, Liming, Chen, Christine, Sean Brogan

Create PR https://github.com/tianocore/edk2/pull/3378 for merge.

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Bob Feng
Sent: Thursday, September 22, 2022 7:11 PM
To: Kun Qin <kuqin12@gmail.com>; devel@edk2.groups.io
Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>; Sean Brogan <sean.brogan@microsoft.com>
Subject: Re: [edk2-devel] [PATCH v1 1/1] BaseTools: Edk2ToolsBuild: Fixing pipeline build due to path too long

Reviewed-by: Bob Feng <bob.c.feng@intel.com>

-----Original Message-----
From: Kun Qin <kuqin12@gmail.com> 
Sent: Thursday, September 22, 2022 4:45 AM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>; Sean Brogan <sean.brogan@microsoft.com>
Subject: [PATCH v1 1/1] BaseTools: Edk2ToolsBuild: Fixing pipeline build due to path too long

From: Sean Brogan <sean.brogan@microsoft.com>

Current implementation of looking up toolchain will _insert_ the findings from vsvarsall.bat to existing path and potentially stuff the variable to exceed the length of maximal path length accepted by Windows.

This change updated the logic to use the discovered shell varialbes to replace the existing path, which is desirable in the specific use case.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>

Co-authored-by: Sean Brogan <sean.brogan@microsoft.com>
Signed-off-by: Kun Qin <kuqin12@gmail.com>
---
 BaseTools/Edk2ToolsBuild.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Edk2ToolsBuild.py b/BaseTools/Edk2ToolsBuild.py index 1ea8187de693..f862468ce275 100644
--- a/BaseTools/Edk2ToolsBuild.py
+++ b/BaseTools/Edk2ToolsBuild.py
@@ -122,7 +122,7 @@ class Edk2ToolsBuild(BaseAbstractInvocable):
             for key in vc_vars.keys():                 logging.debug(f"Var - {key} = {vc_vars[key]}")                 if key.lower() == 'path':-                    shell_env.insert_path(vc_vars[key])+                    shell_env.set_path(vc_vars[key])                 else:                     shell_env.set_shell_var(key, vc_vars[key]) -- 
2.37.1.windows.1







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

* Re: [edk2-devel] [PATCH v1 1/1] BaseTools: Edk2ToolsBuild: Fixing pipeline build due to path too long
  2022-09-22 11:26     ` [edk2-devel] " Bob Feng
@ 2022-09-23  4:42       ` Kun Qin
  0 siblings, 0 replies; 6+ messages in thread
From: Kun Qin @ 2022-09-23  4:42 UTC (permalink / raw)
  To: devel, bob.c.feng; +Cc: Gao, Liming, Chen, Christine, Sean Brogan

Thanks for the help, Bob. It seems that one of the "Reviewed-by" tags 
are breaking the pipeline patchcheck: 
https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=62531&view=logs&j=12f1170f-54f2-53f3-20dd-22fc7dff55f9&t=9c939e41-62c2-5605-5e05-fc3554afc9f5

Would like me to send a v2 patch?

Regards,
Kun

On 09/22/2022 04:26, Bob Feng wrote:
> Create PR https://github.com/tianocore/edk2/pull/3378 for merge.
> 
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Bob Feng
> Sent: Thursday, September 22, 2022 7:11 PM
> To: Kun Qin <kuqin12@gmail.com>; devel@edk2.groups.io
> Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>; Sean Brogan <sean.brogan@microsoft.com>
> Subject: Re: [edk2-devel] [PATCH v1 1/1] BaseTools: Edk2ToolsBuild: Fixing pipeline build due to path too long
> 
> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
> 
> -----Original Message-----
> From: Kun Qin <kuqin12@gmail.com>
> Sent: Thursday, September 22, 2022 4:45 AM
> To: devel@edk2.groups.io
> Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>; Sean Brogan <sean.brogan@microsoft.com>
> Subject: [PATCH v1 1/1] BaseTools: Edk2ToolsBuild: Fixing pipeline build due to path too long
> 
> From: Sean Brogan <sean.brogan@microsoft.com>
> 
> Current implementation of looking up toolchain will _insert_ the findings from vsvarsall.bat to existing path and potentially stuff the variable to exceed the length of maximal path length accepted by Windows.
> 
> This change updated the logic to use the discovered shell varialbes to replace the existing path, which is desirable in the specific use case.
> 
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> 
> Co-authored-by: Sean Brogan <sean.brogan@microsoft.com>
> Signed-off-by: Kun Qin <kuqin12@gmail.com>
> ---
>   BaseTools/Edk2ToolsBuild.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Edk2ToolsBuild.py b/BaseTools/Edk2ToolsBuild.py index 1ea8187de693..f862468ce275 100644
> --- a/BaseTools/Edk2ToolsBuild.py
> +++ b/BaseTools/Edk2ToolsBuild.py
> @@ -122,7 +122,7 @@ class Edk2ToolsBuild(BaseAbstractInvocable):
>               for key in vc_vars.keys():                 logging.debug(f"Var - {key} = {vc_vars[key]}")                 if key.lower() == 'path':-                    shell_env.insert_path(vc_vars[key])+                    shell_env.set_path(vc_vars[key])                 else:                     shell_env.set_shell_var(key, vc_vars[key]) --
> 2.37.1.windows.1
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 

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

end of thread, other threads:[~2022-09-23  4:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-21 20:44 [PATCH v1 0/1] Fixing BaseTool build break Kun Qin
2022-09-21 20:44 ` [PATCH v1 1/1] BaseTools: Edk2ToolsBuild: Fixing pipeline build due to path too long Kun Qin
2022-09-21 23:09   ` [edk2-devel] " Sean
2022-09-22 11:11   ` Bob Feng
     [not found]   ` <17172A4739518A26.13460@groups.io>
2022-09-22 11:26     ` [edk2-devel] " Bob Feng
2022-09-23  4:42       ` Kun Qin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox