From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web12.5244.1608266834137735394 for ; Thu, 17 Dec 2020 20:47:14 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: nathaniel.l.desimone@intel.com) IronPort-SDR: +y5aSt7mMJfYR4w+MEvbCuenpdK6CRaTai07tIbOV1PkwiYJSqU00MzrYH4ctJzRu+ukOLOyxo LMkRFTRjdNXA== X-IronPort-AV: E=McAfee;i="6000,8403,9838"; a="155185896" X-IronPort-AV: E=Sophos;i="5.78,429,1599548400"; d="scan'208";a="155185896" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Dec 2020 20:47:13 -0800 IronPort-SDR: 7iQQWGMZeg4+/KnUTuVMkAWfyB9wewf5Q+xThLk3kJ4R/qdzxQgqHEk/YGQ555qObnBByKoiBv xW6WG2nfkQ5A== X-IronPort-AV: E=Sophos;i="5.78,429,1599548400"; d="scan'208";a="393345350" Received: from nldesimo-desk1.amr.corp.intel.com ([10.254.76.121]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Dec 2020 20:47:12 -0800 From: "Nate DeSimone" To: devel@edk2.groups.io Cc: Ashley E Desimone , Puja Pandya , Bret Barkelew , Prince Agyeman , Erik Bjorge Subject: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Prevent environment variables from causing install failures Date: Thu, 17 Dec 2020 20:46:57 -0800 Message-Id: <20201218044657.2930-1-nathaniel.l.desimone@intel.com> X-Mailer: git-send-email 2.27.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Cc: Nate DeSimone Cc: Puja Pandya Cc: Bret Barkelew Cc: Prince Agyeman Cc: Erik Bjorge Signed-off-by: Nate DeSimone --- 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(InstallLogger.Log); -- 2.27.0.windows.1