From nobody Sat Apr 27 22:15:04 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 1528765238826913.6029190615176; Mon, 11 Jun 2018 18:00:38 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 06DC2211D2300; Mon, 11 Jun 2018 18:00:38 -0700 (PDT) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 E3D4221143596 for ; Mon, 11 Jun 2018 18:00:36 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jun 2018 18:00:36 -0700 Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.129]) by orsmga002.jf.intel.com with ESMTP; 11 Jun 2018 18:00:35 -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.120; helo=mga04.intel.com; envelope-from=yonghong.zhu@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,212,1526367600"; d="scan'208";a="66215374" From: Yonghong Zhu To: edk2-devel@lists.01.org Date: Tue, 12 Jun 2018 09:00:34 +0800 Message-Id: <1528765234-16332-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [edk2] [Patch] BaseTools: Fix one bug of nest !include parser X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yunhua Feng , 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" From: Yunhua Feng The case is DSC file include file1, file1 include file2, after parse file2 finished, DSC parser get the wrong section type, then it would report invalid error. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng Reviewed-by: Yonghong Zhu =20 Tested-by: Michael D Kinney --- BaseTools/Source/Python/Workspace/MetaFileParser.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTool= s/Source/Python/Workspace/MetaFileParser.py index 8ab1dd2..4252e6d 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -1568,11 +1568,15 @@ class DscParser(MetaFileParser): # Parse the included file Parser.Start() =20 # update current status with sub-parser's status self._SectionName =3D Parser._SectionName - self._SectionType =3D Parser._SectionType + if not self._InSubsection: + self._SectionType =3D Parser._SectionType + self._SubsectionType =3D Parser._SubsectionType + self._InSubsection =3D Parser._InSubsection + self._Scope =3D Parser._Scope self._Enabled =3D Parser._Enabled =20 # Insert all records in the table for the included file into d= sc file table Records =3D IncludedFileTable.GetAll() --=20 2.6.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel