From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: bob.c.feng@intel.com) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by groups.io with SMTP; Mon, 06 May 2019 20:57:08 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 May 2019 20:57:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,440,1549958400"; d="scan'208";a="155871209" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by FMSMGA003.fm.intel.com with ESMTP; 06 May 2019 20:57:08 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 6 May 2019 20:57:07 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.129]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.150]) with mapi id 14.03.0415.000; Tue, 7 May 2019 11:57:05 +0800 From: "Bob Feng" To: "Fan, ZhijuX" , "devel@edk2.groups.io" CC: "Gao, Liming" Subject: Re: [PATCH] BaseTools:corrected error message for the DatumType error Thread-Topic: [PATCH] BaseTools:corrected error message for the DatumType error Thread-Index: AdT++jtirIXBduGQSgWIIEUgJ9pFpgFjjiEQ Date: Tue, 7 May 2019 03:57:05 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D16010467F@SHSMSX101.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: bob.c.feng@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Zhiju, Please split the long line into multiple <=3D80char lines, using the backsl= ash so that the patch is easy to review. Also, would you please update the BZ to add the new error message? Thanks, Bob -----Original Message----- From: Fan, ZhijuX=20 Sent: Tuesday, April 30, 2019 10:13 AM To: devel@edk2.groups.io Cc: Gao, Liming ; Feng, Bob C Subject: [PATCH] BaseTools:corrected error message for the DatumType error BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=3D1762 For structure Pcd, Its DatumType may be self-defined, If the PCD DatumType = format is incorrect, this PCD DatumType error message is inappropriate. This patch corrects the error message. Cc: Bob Feng Cc: Liming Gao Signed-off-by: Zhiju.Fan --- BaseTools/Source/Python/Workspace/DscBuildData.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/= Source/Python/Workspace/DscBuildData.py index 5431296b5a..f20a2fcf28 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -943,9 +943,10 @@ class DscBuildData(PlatformBuildClassObject): EdkLogger.error('build', FORMAT_INVALID, ErrStr, File=3Dse= lf.MetaFile, Line=3DLineNo, ExtraData=3D"%s.%s" % (TokenSpaceGuid, Pcd= CName)) if PcdType in (MODEL_PCD_DYNAMIC_DEFAULT, MODEL_PCD_DYNAMIC_EX= _DEFAULT, MODEL_PCD_FIXED_AT_BUILD, MODEL_PCD_PATCHABLE_IN_MODULE): - if self._DecPcds[PcdCName, TokenSpaceGuid].DatumType.strip= () !=3D ValueList[1].strip(): - EdkLogger.error('build', FORMAT_INVALID, "Pcd datumtyp= e used in DSC file is not the same as its declaration in DEC file.", File= =3Dself.MetaFile, Line=3DLineNo, - ExtraData=3D"%s.%s|%s" % (TokenSpaceGuid, = PcdCName, Setting)) + if self._DecPcds[PcdCName, TokenSpaceGuid].BaseDatumType.s= trip() !=3D ValueList[1].strip(): + DecPcd =3D self._DecPcds[PcdCName, TokenSpaceGuid] + EdkLogger.error('build', FORMAT_INVALID, "Pcd datumtyp= e used in DSC file is not the same as its declaration in \n%s(Line: %s). = DatumType:%s"% (PathClass(NormPath(DecPcd.PkgPath), GlobalData.gWorkspac= e, Arch=3Dself._Arch), DecPcd.PcdDefineLineNo, DecPcd.DatumType), File=3Dse= lf.MetaFile, Line=3DLineNo, + ExtraData=3D"Dsc:%s.%s|%s\n Dec:%s.%s|%s|%s= |%s" % (TokenSpaceGuid, PcdCName, Setting, TokenSpaceGuid, PcdCName, DecPcd= .DefaultValueFromDec, DecPcd.DatumType, DecPcd.TokenValue)) if (TokenSpaceGuid + '.' + PcdCName) in GlobalData.gPlatformPcds: if GlobalData.gPlatformPcds[TokenSpaceGuid + '.' + PcdCName] != =3D ValueList[Index]: GlobalData.gPlatformPcds[TokenSpaceGuid + '.' + PcdCName] = =3D ValueList[Index] -- 2.14.1.windows.1