From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=michael.d.kinney@intel.com; receiver=edk2-devel@lists.01.org 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 E86B6210E3DEE for ; Mon, 11 Jun 2018 18:51:20 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jun 2018 18:51:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,212,1526367600"; d="scan'208";a="56313464" Received: from orsmsx103.amr.corp.intel.com ([10.22.225.130]) by fmsmga002.fm.intel.com with ESMTP; 11 Jun 2018 18:51:20 -0700 Received: from orsmsx116.amr.corp.intel.com (10.22.240.14) by ORSMSX103.amr.corp.intel.com (10.22.225.130) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 11 Jun 2018 18:51:20 -0700 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.88]) by ORSMSX116.amr.corp.intel.com ([169.254.7.230]) with mapi id 14.03.0319.002; Mon, 11 Jun 2018 18:51:19 -0700 From: "Kinney, Michael D" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" , "Kinney, Michael D" CC: "Feng, YunhuaX" , "Gao, Liming" Thread-Topic: [edk2] [Patch] BaseTools: Fix one bug of nest !include parser Thread-Index: AQHUAejNz07CxUQ2jE62sp5DZOENe6Rb27Bg Date: Tue, 12 Jun 2018 01:51:19 +0000 Message-ID: References: <1528765234-16332-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1528765234-16332-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.22.254.139] MIME-Version: 1.0 Subject: Re: [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: , X-List-Received-Date: Tue, 12 Jun 2018 01:51:21 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Tested-by: Michael D Kinney Mike =20 > -----Original Message----- > From: edk2-devel [mailto:edk2-devel- > bounces@lists.01.org] On Behalf Of Yonghong Zhu > Sent: Monday, June 11, 2018 6:01 PM > To: edk2-devel@lists.01.org > Cc: Feng, YunhuaX ; Gao, Liming > > Subject: [edk2] [Patch] BaseTools: Fix one bug of nest > !include parser >=20 > From: Yunhua Feng >=20 > 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. >=20 > Cc: Liming Gao > Cc: Yonghong Zhu > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Yunhua Feng > --- > BaseTools/Source/Python/Workspace/MetaFileParser.py | 6 > +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) >=20 > diff --git > a/BaseTools/Source/Python/Workspace/MetaFileParser.py > b/BaseTools/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 dsc file table > Records =3D IncludedFileTable.GetAll() > -- > 2.6.1.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel