public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Desimone, Ashley E" <ashley.e.desimone@intel.com>
To: devel@edk2.groups.io
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>,
	Puja Pandya <puja.pandya@intel.com>
Subject: [edk2-devel][edk2-staging/EdkRepo][PATCH] EdkRepo: Support uninstalling packages with '_' in their name.
Date: Wed, 13 Nov 2019 15:09:57 -0800	[thread overview]
Message-ID: <20191113230957.12644-1-ashley.e.desimone@intel.com> (raw)

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


             reply	other threads:[~2019-11-13 23:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13 23:09 Desimone, Ashley E [this message]
2019-11-13 23:15 ` [edk2-devel][edk2-staging/EdkRepo][PATCH] EdkRepo: Support uninstalling packages with '_' in their name Nate DeSimone

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191113230957.12644-1-ashley.e.desimone@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox