public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel][edk2-staging/EdkRepo][PATCH] EdkRepo: Support uninstalling packages with '_' in their name.
@ 2019-11-13 23:09 Desimone, Ashley E
  2019-11-13 23:15 ` Nate DeSimone
  0 siblings, 1 reply; 2+ messages in thread
From: Desimone, Ashley E @ 2019-11-13 23:09 UTC (permalink / raw)
  To: devel; +Cc: Nate DeSimone, Puja Pandya

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.

Signed-off-by: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
---
 edkrepo_installer/EdkRepoInstaller/InstallWorker.cs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/edkrepo_installer/EdkRepoInstaller/InstallWorker.cs b/edkrepo_installer/EdkRepoInstaller/InstallWorker.cs
index effc3c4..5a358f9 100644
--- a/edkrepo_installer/EdkRepoInstaller/InstallWorker.cs
+++ b/edkrepo_installer/EdkRepoInstaller/InstallWorker.cs
@@ -622,7 +622,10 @@ namespace TianoCore.EdkRepoInstaller
                 {
                     if (Wheel.UninstallAllOtherCopies)
                     {
-                        ExclusivePackages.Add(new Tuple<string, PythonVersion>(Wheel.Package.Name, PyInstance.Version));
+                        //
+                        // pip doesn't understand the difference between '_' and '-'
+                        //
+                        ExclusivePackages.Add(new Tuple<string, PythonVersion>(Wheel.Package.Name.Replace('_', '-'), PyInstance.Version));
                     }
                 }
             }
-- 
2.16.2.windows.1


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

end of thread, other threads:[~2019-11-13 23:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-13 23:09 [edk2-devel][edk2-staging/EdkRepo][PATCH] EdkRepo: Support uninstalling packages with '_' in their name Desimone, Ashley E
2019-11-13 23:15 ` Nate DeSimone

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