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.24; helo=mga09.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 461DA211B696B for ; Sun, 3 Feb 2019 22:48:08 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Feb 2019 22:48:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,559,1539673200"; d="scan'208";a="119768961" Received: from bfeng1-mobl1.ccr.corp.intel.com ([10.254.82.87]) by fmsmga007.fm.intel.com with ESMTP; 03 Feb 2019 22:48:06 -0800 From: "Feng, Bob C" To: edk2-devel@lists.01.org Cc: Bob Feng , Liming Gao Date: Mon, 4 Feb 2019 14:48:00 +0800 Message-Id: <20190204064802.14616-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 Subject: [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: Mon, 04 Feb 2019 06:48:09 -0000 Generate report fail when -Y EXECUTION_ORDER in build command. This patch is going to fix this issue. 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(-) diff --git a/BaseTools/Source/Python/Eot/EotMain.py b/BaseTools/Source/Python/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 import Common.EdkLogger as EdkLogger import Eot.EotGlobalData as EotGlobalData from optparse import OptionParser from Common.StringUtils import NormPath from Common import BuildToolError -from Common.Misc import GuidStructureStringToGuidString, sdict +from Common.Misc import GuidStructureStringToGuidString +from collections import OrderedDict as sdict from Eot.Parser import * from Eot.InfParserLite import EdkInfParser from Common.StringUtils import GetSplitValueList from Eot import c from Eot import Database diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/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 = os.path.join(self._EotDir, "SourceFile.txt") GuidList = os.path.join(self._EotDir, "GuidList.txt") DispatchList = os.path.join(self._EotDir, "Dispatch.txt") - TempFile = open(SourceList, "w+") + TempFile = [] for Item in self._SourceList: FileWrite(TempFile, Item) - TempFile.close() - TempFile = open(GuidList, "w+") + SaveFileOnChange(SourceList, "".join(TempFile), False) + TempFile = [] for Key in self._GuidMap: FileWrite(TempFile, "%s %s" % (Key, self._GuidMap[Key])) - TempFile.close() + SaveFileOnChange(GuidList, "".join(TempFile), False) try: from Eot.EotMain import Eot # -- 2.18.0.windows.1