From: BobCF <bob.c.feng@intel.com>
To: edk2-devel@lists.01.org
Cc: Liming Gao <liming.gao@intel.com>, Jaben Carsey <jaben.carsey@intel.com>
Subject: [Patch] BaseTools: Fix the problem using FILE_GUID override in .dsc
Date: Fri, 16 Nov 2018 10:12:15 +0800 [thread overview]
Message-ID: <20181116021215.54144-1-bob.c.feng@intel.com> (raw)
https://bugzilla.tianocore.org/show_bug.cgi?id=1330
This patch is going to fix the problem using FILE_GUID override in .dsc.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: BobCF <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
---
BaseTools/Source/Python/GenFds/FdfParser.py | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py
index 44cc8f63d0..2fbbad114c 100644
--- a/BaseTools/Source/Python/GenFds/FdfParser.py
+++ b/BaseTools/Source/Python/GenFds/FdfParser.py
@@ -22,11 +22,11 @@ from re import compile, DOTALL
from string import hexdigits
from uuid import UUID
from Common.BuildToolError import *
from Common import EdkLogger
-from Common.Misc import PathClass, tdict
+from Common.Misc import PathClass, tdict, ProcessDuplicatedInf
from Common.StringUtils import NormPath, ReplaceMacro
from Common import GlobalData
from Common.Expression import *
from Common.DataType import *
from Common.MultipleWorkspace import MultipleWorkspace as mws
@@ -2414,12 +2414,16 @@ class FdfParser:
#do case sensitive check for file path
ErrorCode, ErrorInfo = PathClass(NormPath(ffsInf.InfFileName), GenFdsGlobalVariable.WorkSpaceDir).Validate()
if ErrorCode != 0:
EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo)
- if not ffsInf.InfFileName in self.Profile.InfList:
- self.Profile.InfList.append(ffsInf.InfFileName)
+ NewFileName = ffsInf.InfFileName
+ if ffsInf.OverrideGuid:
+ NewFileName = ProcessDuplicatedInf(PathClass(ffsInf.InfFileName,GenFdsGlobalVariable.WorkSpaceDir), ffsInf.OverrideGuid, GenFdsGlobalVariable.WorkSpaceDir).Path
+
+ if not NewFileName in self.Profile.InfList:
+ self.Profile.InfList.append(NewFileName)
FileLineTuple = GetRealFileLine(self.FileName, self.CurrentLineNumber)
self.Profile.InfFileLineList.append(FileLineTuple)
if ffsInf.UseArch:
if ffsInf.UseArch not in self.Profile.InfDict:
self.Profile.InfDict[ffsInf.UseArch] = [ffsInf.InfFileName]
@@ -4344,12 +4348,16 @@ class FdfParser:
#check for file path
ErrorCode, ErrorInfo = PathClass(NormPath(ffsInf.InfFileName), GenFdsGlobalVariable.WorkSpaceDir).Validate()
if ErrorCode != 0:
EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo)
- if not ffsInf.InfFileName in self.Profile.InfList:
- self.Profile.InfList.append(ffsInf.InfFileName)
+ NewFileName = ffsInf.InfFileName
+ if ffsInf.OverrideGuid:
+ NewFileName = ProcessDuplicatedInf(PathClass(ffsInf.InfFileName,GenFdsGlobalVariable.WorkSpaceDir), ffsInf.OverrideGuid, GenFdsGlobalVariable.WorkSpaceDir).Path
+
+ if not NewFileName in self.Profile.InfList:
+ self.Profile.InfList.append(NewFileName)
FileLineTuple = GetRealFileLine(self.FileName, self.CurrentLineNumber)
self.Profile.InfFileLineList.append(FileLineTuple)
if ffsInf.UseArch:
if ffsInf.UseArch not in self.Profile.InfDict:
self.Profile.InfDict[ffsInf.UseArch] = [ffsInf.InfFileName]
--
2.19.1.windows.1
next reply other threads:[~2018-11-16 2:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-16 2:12 BobCF [this message]
2018-11-20 0:01 ` [Patch] BaseTools: Fix the problem using FILE_GUID override in .dsc Gao, Liming
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=20181116021215.54144-1-bob.c.feng@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