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.65; helo=mga03.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 9B222202E531F for ; Thu, 14 Feb 2019 06:01:58 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2019 06:01:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,369,1544515200"; d="scan'208";a="299726521" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga005.jf.intel.com with ESMTP; 14 Feb 2019 06:01:57 -0800 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 14 Feb 2019 06:01:57 -0800 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 14 Feb 2019 06:01:56 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.102]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.36]) with mapi id 14.03.0415.000; Thu, 14 Feb 2019 22:01:54 +0800 From: "Gao, Liming" To: "Feng, Bob C" CC: "edk2-devel@lists.01.org" Thread-Topic: [Patch 1/3] BaseTools: Fixed a build report issue. Thread-Index: AQHUxDs/PzHzF3TYYUmb9L5OnX+nyqXfUvpg Date: Thu, 14 Feb 2019 14:01:54 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E3DEB18@SHSMSX104.ccr.corp.intel.com> References: <20190204064802.14616-1-bob.c.feng@intel.com> <08650203BA1BD64D8AD9B6D5D74A85D1600859D1@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <08650203BA1BD64D8AD9B6D5D74A85D1600859D1@SHSMSX101.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTE4YTY4ZTItMGUzYy00ODM0LTkyOGQtNGRiOGRjOWNlNDcxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTjIweEpsSGU2Q0Qrd0ZCXC9EMEtRdGp4U25ySmgxVVpCWjFKMkVVWWhJTG1odlJ4dnA1QmxlYnZOenRJendTaEQifQ== dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch 1/3] BaseTools: Fixed a build report issue. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2019 14:01:58 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: Feng, Bob C > Sent: Monday, February 4, 2019 2:48 PM > To: edk2-devel@lists.01.org > Cc: Feng, Bob C ; Gao, Liming > Subject: [Patch 1/3] BaseTools: Fixed a build report issue. >=20 > Generate report fail when -Y EXECUTION_ORDER in build command. > This patch is going to fix this issue. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Bob Feng > Cc: Liming Gao > --- > BaseTools/Source/Python/Eot/EotMain.py | 3 ++- > BaseTools/Source/Python/build/BuildReport.py | 8 ++++---- > 2 files changed, 6 insertions(+), 5 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/Eot/EotMain.py b/BaseTools/Source/Py= thon/Eot/EotMain.py > index fd4bee6f90..57f96c89c9 100644 > --- a/BaseTools/Source/Python/Eot/EotMain.py > +++ b/BaseTools/Source/Python/Eot/EotMain.py > @@ -19,11 +19,12 @@ import Common.LongFilePathOs as os, time, glob impor= t Common.EdkLogger as EdkLogger import > Eot.EotGlobalData as EotGlobalData from optparse import OptionParser fr= om Common.StringUtils import NormPath from Common > import BuildToolError -from Common.Misc import GuidStructureStringToGuidS= tring, sdict > +from Common.Misc import GuidStructureStringToGuidString from > +collections import OrderedDict as sdict > from Eot.Parser import * > from Eot.InfParserLite import EdkInfParser from Common.StringUtils impo= rt GetSplitValueList from Eot import c from Eot import > Database diff --git a/BaseTools/Source/Python/build/BuildReport.py b/Base= Tools/Source/Python/build/BuildReport.py > index e457660fce..52764a6c55 100644 > --- a/BaseTools/Source/Python/build/BuildReport.py > +++ b/BaseTools/Source/Python/build/BuildReport.py > @@ -1650,18 +1650,18 @@ class PredictionReport(object): > # > SourceList =3D os.path.join(self._EotDir, "SourceFile.txt") > GuidList =3D os.path.join(self._EotDir, "GuidList.txt") > DispatchList =3D os.path.join(self._EotDir, "Dispatch.txt") >=20 > - TempFile =3D open(SourceList, "w+") > + TempFile =3D [] > for Item in self._SourceList: > FileWrite(TempFile, Item) > - TempFile.close() > - TempFile =3D open(GuidList, "w+") > + SaveFileOnChange(SourceList, "".join(TempFile), False) > + TempFile =3D [] > for Key in self._GuidMap: > FileWrite(TempFile, "%s %s" % (Key, self._GuidMap[Key])) > - TempFile.close() > + SaveFileOnChange(GuidList, "".join(TempFile), False) >=20 > try: > from Eot.EotMain import Eot >=20 > # > -- > 2.18.0.windows.1