public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-staging/EdkRepo] [PATCH] EdkRepo: Prevent environment variables from causing install failures
@ 2020-12-18  4:46 Nate DeSimone
  2020-12-18 16:59 ` [edk2-devel] " Bjorge, Erik C
  2020-12-19  0:04 ` Ashley E Desimone
  0 siblings, 2 replies; 3+ messages in thread
From: Nate DeSimone @ 2020-12-18  4:46 UTC (permalink / raw)
  To: devel
  Cc: Ashley E Desimone, Puja Pandya, Bret Barkelew, Prince Agyeman,
	Erik Bjorge

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@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Prince Agyeman <prince.agyeman@intel.com>
Cc: Erik Bjorge <erik.c.bjorge@intel.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@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


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

* Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH] EdkRepo: Prevent environment variables from causing install failures
  2020-12-18  4:46 [edk2-staging/EdkRepo] [PATCH] EdkRepo: Prevent environment variables from causing install failures Nate DeSimone
@ 2020-12-18 16:59 ` Bjorge, Erik C
  2020-12-19  0:04 ` Ashley E Desimone
  1 sibling, 0 replies; 3+ messages in thread
From: Bjorge, Erik C @ 2020-12-18 16:59 UTC (permalink / raw)
  To: devel@edk2.groups.io, Desimone, Nathaniel L
  Cc: Desimone, Ashley E, Pandya, Puja, Bret Barkelew, Agyeman, Prince

Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Nate DeSimone
Sent: Thursday, December 17, 2020 8:47 PM
To: devel@edk2.groups.io
Cc: Desimone, Ashley E <ashley.e.desimone@intel.com>; Pandya, Puja <puja.pandya@intel.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>; Agyeman, Prince <prince.agyeman@intel.com>; Bjorge, Erik C <erik.c.bjorge@intel.com>
Subject: [edk2-devel] [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@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Prince Agyeman <prince.agyeman@intel.com>
Cc: Erik Bjorge <erik.c.bjorge@intel.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@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







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

* Re: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Prevent environment variables from causing install failures
  2020-12-18  4:46 [edk2-staging/EdkRepo] [PATCH] EdkRepo: Prevent environment variables from causing install failures Nate DeSimone
  2020-12-18 16:59 ` [edk2-devel] " Bjorge, Erik C
@ 2020-12-19  0:04 ` Ashley E Desimone
  1 sibling, 0 replies; 3+ messages in thread
From: Ashley E Desimone @ 2020-12-19  0:04 UTC (permalink / raw)
  To: Desimone, Nathaniel L, devel@edk2.groups.io
  Cc: Pandya, Puja, Bret Barkelew, Agyeman, Prince, Bjorge, Erik C

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

-----Original Message-----
From: Nate DeSimone <nathaniel.l.desimone@intel.com> 
Sent: Thursday, December 17, 2020 8:47 PM
To: devel@edk2.groups.io
Cc: Desimone, Ashley E <ashley.e.desimone@intel.com>; Pandya, Puja <puja.pandya@intel.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>; Agyeman, Prince <prince.agyeman@intel.com>; Bjorge, Erik C <erik.c.bjorge@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@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Prince Agyeman <prince.agyeman@intel.com>
Cc: Erik Bjorge <erik.c.bjorge@intel.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@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


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

end of thread, other threads:[~2020-12-19  0:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-18  4:46 [edk2-staging/EdkRepo] [PATCH] EdkRepo: Prevent environment variables from causing install failures Nate DeSimone
2020-12-18 16:59 ` [edk2-devel] " Bjorge, Erik C
2020-12-19  0:04 ` Ashley E Desimone

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