]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Edk2ToolsBuild: Fixing pipeline build due to path too long
authorSean Brogan <sean.brogan@microsoft.com>
Wed, 21 Sep 2022 20:44:59 +0000 (04:44 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 22 Sep 2022 12:23:20 +0000 (12:23 +0000)
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>
Reviewed-by: Sean Brogan <sean.brogan@microsoft.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
BaseTools/Edk2ToolsBuild.py

index 1ea8187de693b9f1d626b1a50d57c2978f70f9b5..f862468ce2755869022ecbcc32b1e523db01cff9 100644 (file)
@@ -122,7 +122,7 @@ class Edk2ToolsBuild(BaseAbstractInvocable):
             for key in vc_vars.keys():\r
                 logging.debug(f"Var - {key} = {vc_vars[key]}")\r
                 if key.lower() == 'path':\r
-                    shell_env.insert_path(vc_vars[key])\r
+                    shell_env.set_path(vc_vars[key])\r
                 else:\r
                     shell_env.set_shell_var(key, vc_vars[key])\r
 \r