From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web11.585.1573686602583134517 for ; Wed, 13 Nov 2019 15:10:02 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: ashley.e.desimone@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2019 15:10:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,302,1569308400"; d="scan'208";a="288035081" Received: from aedesimo-desk.amr.corp.intel.com ([10.7.159.171]) by orsmga001.jf.intel.com with ESMTP; 13 Nov 2019 15:10:01 -0800 From: "Desimone, Ashley E" To: devel@edk2.groups.io Cc: Nate DeSimone , Puja Pandya Subject: [edk2-devel][edk2-staging/EdkRepo][PATCH] EdkRepo: Support uninstalling packages with '_' in their name. Date: Wed, 13 Nov 2019 15:09:57 -0800 Message-Id: <20191113230957.12644-1-ashley.e.desimone@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 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 Cc: Nate DeSimone Cc: Puja Pandya --- 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(Wheel.Package.Name, PyInstance.Version)); + // + // pip doesn't understand the difference between '_' and '-' + // + ExclusivePackages.Add(new Tuple(Wheel.Package.Name.Replace('_', '-'), PyInstance.Version)); } } } -- 2.16.2.windows.1