From nobody Mon Apr 29 16:47:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1531188358613486.3259100554991; Mon, 9 Jul 2018 19:05:58 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 16FC420968915; Mon, 9 Jul 2018 19:05:58 -0700 (PDT) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4633F202E53F3 for ; Mon, 9 Jul 2018 19:05:57 -0700 (PDT) Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jul 2018 19:05:57 -0700 Received: from shwdeopenpsi105.ccr.corp.intel.com ([10.239.9.110]) by fmsmga008.fm.intel.com with ESMTP; 09 Jul 2018 19:05:55 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,332,1526367600"; d="scan'208";a="53827321" From: BobCF To: edk2-devel@lists.01.org Date: Tue, 10 Jul 2018 10:05:44 +0800 Message-Id: <20180710020544.104832-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 Subject: [edk2] [Patch] BaseTools: Remove a unused function. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" the call statement of _CheckDuplicateInFV() was commented out in 2014. There is no call statement of _CheckDuplicateInFV(), so remove it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng Cc: Liming Gao Cc: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/AutoGen.py | 128 -------------------------= ---- 1 file changed, 128 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/= Python/AutoGen/AutoGen.py index d100648606..57a4b4923f 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -617,13 +617,10 @@ class WorkspaceAutoGen(AutoGen): # # Check PCD type and definition between DSC and DEC # self._CheckPcdDefineAndType() =20 -# if self.FdfFile: -# self._CheckDuplicateInFV(Fdf) - # # Create BuildOptions Macro & PCD metafile, also add the Active Pl= atform and FDF file. # content =3D 'gCommandLineDefines: ' content +=3D str(GlobalData.gCommandLineDefines) @@ -759,135 +756,10 @@ class WorkspaceAutoGen(AutoGen): for filePath in self.BuildDatabase[self.MetaFile, Arch, Target= , Toolchain]._RawData.IncludedFiles: AllWorkSpaceMetaFiles.add(filePath.Path) =20 return AllWorkSpaceMetaFiles =20 - ## _CheckDuplicateInFV() method - # - # Check whether there is duplicate modules/files exist in FV section. - # The check base on the file GUID; - # - def _CheckDuplicateInFV(self, Fdf): - for Fv in Fdf.Profile.FvDict: - _GuidDict =3D {} - for FfsFile in Fdf.Profile.FvDict[Fv].FfsList: - if FfsFile.InfFileName and FfsFile.NameGuid is None: - # - # Get INF file GUID - # - InfFoundFlag =3D False - for Pa in self.AutoGenObjectList: - if InfFoundFlag: - break - for Module in Pa.ModuleAutoGenList: - if path.normpath(Module.MetaFile.File) =3D=3D = path.normpath(FfsFile.InfFileName): - InfFoundFlag =3D True - if Module.Guid.upper() not in _GuidDict: - _GuidDict[Module.Guid.upper()] =3D Ffs= File - break - else: - EdkLogger.error("build", - FORMAT_INVALID, - "Duplicate GUID found = for these lines: Line %d: %s and Line %d: %s. GUID: %s" % (FfsFile.CurrentL= ineNum, - = FfsFile.CurrentLin= eContent, - = _GuidDict[Module.G= uid.upper()].CurrentLineNum, - = _GuidDict[Module.G= uid.upper()].CurrentLineContent, - = Module.Guid.upper(= )), - ExtraData=3Dself.FdfFi= le) - # - # Some INF files not have entity in DSC file. - # - if not InfFoundFlag: - if FfsFile.InfFileName.find('$') =3D=3D -1: - InfPath =3D NormPath(FfsFile.InfFileName) - if not os.path.exists(InfPath): - EdkLogger.error('build', GENFDS_ERROR, "No= n-existant Module %s !" % (FfsFile.InfFileName)) - - PathClassObj =3D PathClass(FfsFile.InfFileName= , self.WorkspaceDir) - # - # Here we just need to get FILE_GUID from INF = file, use 'COMMON' as ARCH attribute. and use - # BuildObject from one of AutoGenObjectList is= enough. - # - InfObj =3D self.AutoGenObjectList[0].BuildData= base.WorkspaceDb.BuildObject[PathClassObj, TAB_ARCH_COMMON, self.BuildTarge= t, self.ToolChain] - if InfObj.Guid.upper() not in _GuidDict: - _GuidDict[InfObj.Guid.upper()] =3D FfsFile - else: - EdkLogger.error("build", - FORMAT_INVALID, - "Duplicate GUID found for = these lines: Line %d: %s and Line %d: %s. GUID: %s" % (FfsFile.CurrentLineN= um, - = FfsFile.CurrentLineCon= tent, - = _GuidDict[InfObj.Guid.= upper()].CurrentLineNum, - = _GuidDict[InfObj.Guid.= upper()].CurrentLineContent, - = InfObj.Guid.upper()), - ExtraData=3Dself.FdfFile) - InfFoundFlag =3D False - - if FfsFile.NameGuid is not None: - # - # If the NameGuid reference a PCD name. - # The style must match: PCD(xxxx.yyy) - # - if gPCDAsGuidPattern.match(FfsFile.NameGuid): - # - # Replace the PCD value. - # - _PcdName =3D FfsFile.NameGuid.lstrip("PCD(").rstri= p(")") - PcdFoundFlag =3D False - for Pa in self.AutoGenObjectList: - if not PcdFoundFlag: - for PcdItem in Pa.AllPcdList: - if (PcdItem.TokenSpaceGuidCName + "." = + PcdItem.TokenCName) =3D=3D _PcdName: - # - # First convert from CFormatGuid t= o GUID string - # - _PcdGuidString =3D GuidStructureSt= ringToGuidString(PcdItem.DefaultValue) - - if not _PcdGuidString: - # - # Then try Byte array. - # - _PcdGuidString =3D GuidStructu= reByteArrayToGuidString(PcdItem.DefaultValue) - - if not _PcdGuidString: - # - # Not Byte array or CFormat GU= ID, raise error. - # - EdkLogger.error("build", - FORMAT_INVALID, - "The format of= PCD value is incorrect. PCD: %s , Value: %s\n" % (_PcdName, PcdItem.Defaul= tValue), - ExtraData=3Dse= lf.FdfFile) - - if _PcdGuidString.upper() not in _= GuidDict: - _GuidDict[_PcdGuidString.upper= ()] =3D FfsFile - PcdFoundFlag =3D True - break - else: - EdkLogger.error("build", - FORMAT_INVALID, - "Duplicate GUI= D found for these lines: Line %d: %s and Line %d: %s. GUID: %s" % (FfsFile.= CurrentLineNum, - = FfsFile.Cu= rrentLineContent, - = _GuidDict[= _PcdGuidString.upper()].CurrentLineNum, - = _GuidDict[= _PcdGuidString.upper()].CurrentLineContent, - = FfsFile.Na= meGuid.upper()), - ExtraData=3Dse= lf.FdfFile) - - if FfsFile.NameGuid.upper() not in _GuidDict: - _GuidDict[FfsFile.NameGuid.upper()] =3D FfsFile - else: - # - # Two raw file GUID conflict. - # - EdkLogger.error("build", - FORMAT_INVALID, - "Duplicate GUID found for these li= nes: Line %d: %s and Line %d: %s. GUID: %s" % (FfsFile.CurrentLineNum, - = FfsFile.CurrentLineContent, - = _GuidDict[FfsFile.NameGuid.upp= er()].CurrentLineNum, - = _GuidDict[FfsFile.NameGuid.upp= er()].CurrentLineContent, - = FfsFile.NameGuid.upper()), - ExtraData=3Dself.FdfFile) - - def _CheckPcdDefineAndType(self): PcdTypeSet =3D {TAB_PCDS_FIXED_AT_BUILD, TAB_PCDS_PATCHABLE_IN_MODULE, TAB_PCDS_FEATURE_FLAG, TAB_PCDS_DYNAMIC, --=20 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel