* Re: [edk2-devel] [Patch 1/1] BaseTools: Fixed issue of incorrect Module Unique Name
[not found] <15BB53DAB78C65A5.28665@groups.io>
@ 2019-08-16 7:54 ` Bob Feng
2019-08-16 14:37 ` Liming Gao
0 siblings, 1 reply; 2+ messages in thread
From: Bob Feng @ 2019-08-16 7:54 UTC (permalink / raw)
To: devel@edk2.groups.io; +Cc: Gao, Liming, Shi, Steven
This patch is to fix a critical BaseTools regression bug and it need to be merged to edk2 master for the coming stable tag.
Thanks,
Bob
-----Original Message-----
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Bob Feng
Sent: Friday, August 16, 2019 2:38 PM
To: devel@edk2.groups.io
Cc: Gao, Liming <liming.gao@intel.com>; Shi, Steven <steven.shi@intel.com>; Feng, Bob C <bob.c.feng@intel.com>
Subject: [edk2-devel] [Patch 1/1] BaseTools: Fixed issue of incorrect Module Unique Name
https://bugzilla.tianocore.org/show_bug.cgi?id=2088
If there are more than one override instance for a same module, the Module Unique Name is generated incorrectly.
Cc: Liming Gao <liming.gao@intel.com>
Cc: Steven Shi <steven.shi@intel.com>
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
---
BaseTools/Source/Python/AutoGen/ModuleAutoGen.py | 2 +-
BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py
index 9ecf5c2dbe0c..076ce0e39c37 100644
--- a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py
@@ -293,11 +293,11 @@ class ModuleAutoGen(AutoGen):
@property
def UniqueBaseName(self):
ModuleNames = self.DataPipe.Get("M_Name")
if not ModuleNames:
return self.Name
- return ModuleNames.get(self.Name,self.Name)
+ return ModuleNames.get((self.Name,self.MetaFile),self.Name)
# Macros could be used in build_rule.txt (also Makefile)
@cached_property
def Macros(self):
return OrderedDict((
diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
index 4abfc6c29d1b..dd629ba2fac2 100644
--- a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
@@ -1364,18 +1364,19 @@ class PlatformAutoGen(AutoGen):
ModuleNameDict[unique_base_name].append(Module.MetaFile)
if Module.BaseName not in UniqueName:
UniqueName[Module.BaseName] = set()
UniqueName[Module.BaseName].add((self.ModuleGuid(Module),Module.MetaFile))
for module_paths in ModuleNameDict.values():
- if len(module_paths) > 1 and len(set(module_paths))>1:
+ if len(set(module_paths))>1:
samemodules = list(set(module_paths))
EdkLogger.error("build", FILE_DUPLICATED, 'Modules have same BaseName and FILE_GUID:\n'
' %s\n %s' % (samemodules[0], samemodules[1]))
for name in UniqueName:
Guid_Path = UniqueName[name]
if len(Guid_Path) > 1:
- retVal[name] = '%s_%s' % (name,Guid_Path.pop()[0])
+ for guid,mpath in Guid_Path:
+ retVal[(name,mpath)] = '%s_%s' % (name,guid)
return retVal
## Expand * in build option key
#
# @param Options Options to be expanded
# @param ToolDef Use specified ToolDef instead of full version.
--
2.20.1.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [edk2-devel] [Patch 1/1] BaseTools: Fixed issue of incorrect Module Unique Name
2019-08-16 7:54 ` [edk2-devel] [Patch 1/1] BaseTools: Fixed issue of incorrect Module Unique Name Bob Feng
@ 2019-08-16 14:37 ` Liming Gao
0 siblings, 0 replies; 2+ messages in thread
From: Liming Gao @ 2019-08-16 14:37 UTC (permalink / raw)
To: Feng, Bob C, devel@edk2.groups.io; +Cc: Shi, Steven
Reviewed-by: Liming Gao <liming.gao@intel.com>
> -----Original Message-----
> From: Feng, Bob C
> Sent: Friday, August 16, 2019 3:55 PM
> To: devel@edk2.groups.io
> Cc: Gao, Liming <liming.gao@intel.com>; Shi, Steven <steven.shi@intel.com>
> Subject: RE: [edk2-devel] [Patch 1/1] BaseTools: Fixed issue of incorrect Module Unique Name
>
> This patch is to fix a critical BaseTools regression bug and it need to be merged to edk2 master for the coming stable tag.
>
> Thanks,
> Bob
>
> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Bob Feng
> Sent: Friday, August 16, 2019 2:38 PM
> To: devel@edk2.groups.io
> Cc: Gao, Liming <liming.gao@intel.com>; Shi, Steven <steven.shi@intel.com>; Feng, Bob C <bob.c.feng@intel.com>
> Subject: [edk2-devel] [Patch 1/1] BaseTools: Fixed issue of incorrect Module Unique Name
>
> https://bugzilla.tianocore.org/show_bug.cgi?id=2088
> If there are more than one override instance for a same module, the Module Unique Name is generated incorrectly.
>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Steven Shi <steven.shi@intel.com>
> Signed-off-by: Bob Feng <bob.c.feng@intel.com>
> ---
> BaseTools/Source/Python/AutoGen/ModuleAutoGen.py | 2 +-
> BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 5 +++--
> 2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py
> index 9ecf5c2dbe0c..076ce0e39c37 100644
> --- a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py
> +++ b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py
> @@ -293,11 +293,11 @@ class ModuleAutoGen(AutoGen):
> @property
> def UniqueBaseName(self):
> ModuleNames = self.DataPipe.Get("M_Name")
> if not ModuleNames:
> return self.Name
> - return ModuleNames.get(self.Name,self.Name)
> + return ModuleNames.get((self.Name,self.MetaFile),self.Name)
>
> # Macros could be used in build_rule.txt (also Makefile)
> @cached_property
> def Macros(self):
> return OrderedDict((
> diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
> index 4abfc6c29d1b..dd629ba2fac2 100644
> --- a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
> +++ b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
> @@ -1364,18 +1364,19 @@ class PlatformAutoGen(AutoGen):
> ModuleNameDict[unique_base_name].append(Module.MetaFile)
> if Module.BaseName not in UniqueName:
> UniqueName[Module.BaseName] = set()
> UniqueName[Module.BaseName].add((self.ModuleGuid(Module),Module.MetaFile))
> for module_paths in ModuleNameDict.values():
> - if len(module_paths) > 1 and len(set(module_paths))>1:
> + if len(set(module_paths))>1:
> samemodules = list(set(module_paths))
> EdkLogger.error("build", FILE_DUPLICATED, 'Modules have same BaseName and FILE_GUID:\n'
> ' %s\n %s' % (samemodules[0], samemodules[1]))
> for name in UniqueName:
> Guid_Path = UniqueName[name]
> if len(Guid_Path) > 1:
> - retVal[name] = '%s_%s' % (name,Guid_Path.pop()[0])
> + for guid,mpath in Guid_Path:
> + retVal[(name,mpath)] = '%s_%s' % (name,guid)
> return retVal
> ## Expand * in build option key
> #
> # @param Options Options to be expanded
> # @param ToolDef Use specified ToolDef instead of full version.
> --
> 2.20.1.windows.1
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-08-16 14:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <15BB53DAB78C65A5.28665@groups.io>
2019-08-16 7:54 ` [edk2-devel] [Patch 1/1] BaseTools: Fixed issue of incorrect Module Unique Name Bob Feng
2019-08-16 14:37 ` Liming Gao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox