From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: bob.c.feng@intel.com) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by groups.io with SMTP; Tue, 07 May 2019 01:04:56 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 May 2019 01:04:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,441,1549958400"; d="scan'208";a="168951875" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga002.fm.intel.com with ESMTP; 07 May 2019 01:04:55 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 7 May 2019 01:04:55 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 7 May 2019 01:04:55 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.129]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.136]) with mapi id 14.03.0415.000; Tue, 7 May 2019 16:04:53 +0800 From: "Bob Feng" To: "Fan, ZhijuX" , "devel@edk2.groups.io" CC: "Gao, Liming" Subject: Re: [PATCH V2] BaseTools:corrected error message for the DatumType error Thread-Topic: [PATCH V2] BaseTools:corrected error message for the DatumType error Thread-Index: AdUEpGjFkIfrSrzWRqGESuc9+q5jWwABxrPg Date: Tue, 7 May 2019 08:04:53 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D160105A0D@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 Reviewed-by: Bob Feng -----Original Message----- From: Fan, ZhijuX=20 Sent: Tuesday, May 7, 2019 3:14 PM To: devel@edk2.groups.io Cc: Gao, Liming ; Feng, Bob C Subject: [PATCH V2] BaseTools:corrected error message for the DatumType err= or 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 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/= Source/Python/Workspace/DscBuildData.py index 1d7a6a11b8..e998aa7270 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -943,9 +943,13 @@ 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 datumtype used in DSC file is not= the same as its declaration. DatumType:%s"%DecPcd.DatumType, + File=3Dself.MetaFile, Line=3DLineNo, + ExtraData=3D"Dsc:%s.%s|%s\n Dec:%s.= %s|%s|%s|%s" % (TokenSpaceGuid, PcdCName, Setting, TokenSpaceGuid, \ + PcdCName, DecPcd.DefaultValue,=20 + 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