From nobody Sat May 18 23:23:34 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 Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1514259228495219.13426732784694; Mon, 25 Dec 2017 19:33:48 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 26C2C21CB87A5; Mon, 25 Dec 2017 19:28:53 -0800 (PST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 0434821CB87A1 for ; Mon, 25 Dec 2017 19:28:51 -0800 (PST) Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Dec 2017 19:33:45 -0800 Received: from shwdeopenpsi105.ccr.corp.intel.com ([10.239.9.129]) by orsmga008.jf.intel.com with ESMTP; 25 Dec 2017 19:33:44 -0800 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=134.134.136.31; helo=mga06.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.45,458,1508828400"; d="scan'208";a="5588948" From: BobCF To: edk2-devel@lists.01.org Date: Tue, 26 Dec 2017 11:33:33 +0800 Message-Id: <20171226033333.3396-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.14.3.windows.1 Subject: [edk2] [Patch] BaseTools: Fix building FatPkg failed issue X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 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" Using property instead of vairable for DecPcds. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng CC: Liming Gao Reviewed-by: Liming Gao --- BaseTools/Source/Python/Workspace/DscBuildData.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/= Source/Python/Workspace/DscBuildData.py index b60c0fdf3..dcc70e8ba 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -1010,11 +1010,11 @@ class DscBuildData(PlatformBuildClassObject): else: EdkLogger.error('build', PARSER_ERROR, "Pcd (%s.%s) defined in DSC is not declared in= DEC files. Arch: ['%s']" % (str_pcd[0], str_pcd[1], self._Arch), File=3Dself.MetaFile,Line =3D StrPcdSet[str_pc= d][0][5]) # Add the Structure PCD that only defined in DEC, don't have overr= ide in DSC file - for Pcd in self._DecPcds: + for Pcd in self.DecPcds: if type (self._DecPcds[Pcd]) is StructurePcd: if Pcd not in S_pcd_set: str_pcd_obj_str =3D StructurePcd() str_pcd_obj_str.copy(self._DecPcds[Pcd]) str_pcd_obj =3D Pcds.get(Pcd, None) @@ -1987,11 +1987,25 @@ class DscBuildData(PlatformBuildClassObject): # def AddPcd(self, Name, Guid, Value): if (Name, Guid) not in self.Pcds: self.Pcds[Name, Guid] =3D PcdClassObject(Name, Guid, '', '', '= ', '', '', {}, False, None) self.Pcds[Name, Guid].DefaultValue =3D Value - + @property + def DecPcds(self): + if self._DecPcds =3D=3D None: + FdfInfList =3D [] + if GlobalData.gFdfParser: + FdfInfList =3D GlobalData.gFdfParser.Profile.InfList + PkgSet =3D set() + for Inf in FdfInfList: + ModuleFile =3D PathClass(NormPath(Inf), GlobalData.gWorksp= ace, Arch=3Dself._Arch) + if ModuleFile in self._Modules: + continue + ModuleData =3D self._Bdb[ModuleFile, self._Arch, self._Tar= get, self._Toolchain] + PkgSet.update(ModuleData.Packages) + self._DecPcds =3D GetDeclaredPcd(self, self._Bdb, self._Arch, = self._Target, self._Toolchain,PkgSet) + return self._DecPcds _Macros =3D property(_GetMacros) Arch =3D property(_GetArch, _SetArch) Platform =3D property(_GetPlatformName) PlatformName =3D property(_GetPlatformName) Guid =3D property(_GetFileGuid) --=20 2.14.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel