[edk2-devel] [edk2-staging/EdkRepo] [PATCH] EdkRepo: Prevent environment variables from causing install failures

Ashley E Desimone ashley.e.desimone at intel.com
Sat Dec 19 00:04:05 UTC 2020


Reviewed-by: Ashley DeSimone <ashley.e.desimone at intel.com>

-----Original Message-----
From: Nate DeSimone <nathaniel.l.desimone at intel.com> 
Sent: Thursday, December 17, 2020 8:47 PM
To: devel at edk2.groups.io
Cc: Desimone, Ashley E <ashley.e.desimone at intel.com>; Pandya, Puja <puja.pandya at intel.com>; Bret Barkelew <Bret.Barkelew at microsoft.com>; Agyeman, Prince <prince.agyeman at intel.com>; Bjorge, Erik C <erik.c.bjorge at intel.com>
Subject: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Prevent environment variables from causing install failures

If the following two environment variables in the global system scope:

PIP_INDEX_URL
PIP_TARGET

It will breaks the EdkRepo installer's ability to place files into the Python site-packages directory. To workaround this, the installer should temporarily delete those environment variables.

Cc: Ashley E Desimone <ashley.e.desimone at intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone at intel.com>
Cc: Puja Pandya <puja.pandya at intel.com>
Cc: Bret Barkelew <Bret.Barkelew at microsoft.com>
Cc: Prince Agyeman <prince.agyeman at intel.com>
Cc: Erik Bjorge <erik.c.bjorge at intel.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone at intel.com>
---
 edkrepo_installer/EdkRepoInstaller/InstallWorker.cs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/edkrepo_installer/EdkRepoInstaller/InstallWorker.cs b/edkrepo_installer/EdkRepoInstaller/InstallWorker.cs
index 679b4f4..0dadbbf 100644
--- a/edkrepo_installer/EdkRepoInstaller/InstallWorker.cs
+++ b/edkrepo_installer/EdkRepoInstaller/InstallWorker.cs
@@ -576,6 +576,8 @@ namespace TianoCore.EdkRepoInstaller
             Action ReportFailure = new Action(delegate () { FailureReported = true; });
             Environment.SetEnvironmentVariable("PYTHONHOME", null);
             Environment.SetEnvironmentVariable("PYTHONPATH", null);
+            Environment.SetEnvironmentVariable("PIP_INDEX_URL", null);
+            Environment.SetEnvironmentVariable("PIP_TARGET", null);
             if (VendorCustomizer.Instance != null)
             {
                 VendorCustomizer.Instance.WriteToInstallLog = new Action<string>(InstallLogger.Log);
--
2.27.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#69233): https://edk2.groups.io/g/devel/message/69233
Mute This Topic: https://groups.io/mt/79055305/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list