From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com []) by mx.groups.io with SMTP id smtpd.web11.74233.1584379978542701702 for ; Mon, 16 Mar 2020 10:33:03 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: nathaniel.l.desimone@intel.com) IronPort-SDR: r02Pou4poet6019HAyGtydsN6JTB3RUyxJOUVd70gD8alyh8vn5Y57epTK0/nvqRMORmfL6dbZ twgLIt0Yod+w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2020 10:33:02 -0700 IronPort-SDR: LcOpeJsLSFZNrkXdgMPOsWVCznlzEoqxVTKrxBn97vKlAcvAILSXcgQ0mbOlWKKCwHiz666tkk 2DVhizRGdDXw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,561,1574150400"; d="scan'208";a="417229365" Received: from nldesimo-desk1.amr.corp.intel.com ([10.7.159.63]) by orsmga005.jf.intel.com with ESMTP; 16 Mar 2020 10:33:02 -0700 From: "Nate DeSimone" To: devel@edk2.groups.io Cc: Ashley DeSimone , Puja Pandya , Erik Bjorge , Bret Barkelew Subject: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Uninstaller does not uninstall packages with '_' in their name. Date: Mon, 16 Mar 2020 10:32:47 -0700 Message-Id: <20200316173248.1678-2-nathaniel.l.desimone@intel.com> X-Mailer: git-send-email 2.24.0.windows.2 In-Reply-To: <20200316173248.1678-1-nathaniel.l.desimone@intel.com> References: <20200316173248.1678-1-nathaniel.l.desimone@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit pip does not support '_' in package names and converts them to '-' after installing the wheel. In order to uninstall affected packages the '_' needs to be converted to a '-' when calculating the package name. Cc: Ashley DeSimone Cc: Puja Pandya Cc: Erik Bjorge Cc: Bret Barkelew Signed-off-by: Nate DeSimone --- edkrepo_installer/EdkRepoInstaller/InstallWorker.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/edkrepo_installer/EdkRepoInstaller/InstallWorker.cs b/edkrepo_installer/EdkRepoInstaller/InstallWorker.cs index 5a358f9..f9738fd 100644 --- a/edkrepo_installer/EdkRepoInstaller/InstallWorker.cs +++ b/edkrepo_installer/EdkRepoInstaller/InstallWorker.cs @@ -550,10 +550,16 @@ namespace TianoCore.EdkRepoInstaller { if (VendorCustomizer.Instance.GetPythonWheelsToUninstall != null) { - return VendorCustomizer.Instance.GetPythonWheelsToUninstall(); + // + // pip doesn't understand the difference between '_' and '-' + // + return VendorCustomizer.Instance.GetPythonWheelsToUninstall().Select(p => p.Replace('_', '-')); } } - return new string[] { InstallerStrings.EdkrepoPackageName }; + // + // pip doesn't understand the difference between '_' and '-' + // + return (new string[] { InstallerStrings.EdkrepoPackageName }).Select(p => p.Replace('_', '-')); } public void PerformInstall(Action ReportComplete, Action ReportProgress, Action AllowCancel, Func CancelPending) -- 2.24.0.windows.2