From nobody Tue May 7 21:22:21 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 1520240062734567.7927091772173; Mon, 5 Mar 2018 00:54:22 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 6C9302243694D; Mon, 5 Mar 2018 00:48:08 -0800 (PST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 D6AFC209574CB for ; Mon, 5 Mar 2018 00:48:06 -0800 (PST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Mar 2018 00:54:19 -0800 Received: from shwdeopenpsi105.ccr.corp.intel.com ([10.239.9.129]) by orsmga003.jf.intel.com with ESMTP; 05 Mar 2018 00:54:18 -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.20; helo=mga02.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.47,426,1515484800"; d="scan'208";a="32445499" From: BobCF To: edk2-devel@lists.01.org Date: Mon, 5 Mar 2018 16:54:16 +0800 Message-Id: <20180305085416.18308-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.14.3.windows.1 Subject: [edk2] [Patch] BaseTool: Enhance error message. 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" Enhance the error message when the PCD from commandline can not be found. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng Cc: Liming Gao --- 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 7b5c7ebc34..9838acb4ed 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -1103,14 +1103,15 @@ class DscBuildData(PlatformBuildClassObject): AUTOGEN_ERROR, "The Pcd %s is found under= multiple different TokenSpaceGuid: %s and %s." % (TokenCName, PcdItem.Toke= nSpaceGuidCName, TokenSpaceGuidCNameList[0]) ) GlobalData.BuildOptionPcd[i] =3D (TokenSpaceGuidCName,= TokenCName, FieldName,NewValue,("build command options",1)) if not FoundFlag: - if HasTokenSpace: - EdkLogger.error('build', AUTOGEN_ERROR, "The Pcd %= s.%s is not found in the DEC file." % (TokenSpaceGuidCName, TokenCName)) + if pcdname.count(".") > 1: + pcdnamefield =3D pcdname.split(".") + EdkLogger.error('build', AUTOGEN_ERROR, "The Pcd %= s.%s is not found in the DEC file." % (pcdnamefield[0],pcdnamefield[1])) else: - EdkLogger.error('build', AUTOGEN_ERROR, "The Pcd %= s is not found in the DEC file." % (TokenCName)) + EdkLogger.error('build', AUTOGEN_ERROR, "The Pcd %= s is not found in the DEC file." % (pcdname)) for BuildData in self._Bdb._CACHE_.values(): if BuildData.MetaFile.Ext =3D=3D '.dec' or BuildData.M= etaFile.Ext =3D=3D '.dsc': continue for key in BuildData.Pcds: PcdItem =3D BuildData.Pcds[key] --=20 2.14.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel