From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 53F061A1E8B for ; Fri, 7 Oct 2016 14:33:14 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 07 Oct 2016 14:33:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,456,1473145200"; d="scan'208";a="1050925903" Received: from mdkinney-mobl.amr.corp.intel.com ([10.254.78.24]) by fmsmga001.fm.intel.com with ESMTP; 07 Oct 2016 14:33:13 -0700 From: Michael Kinney To: edk2-devel@lists.01.org Cc: Kelly Steele , Yonghong Zhu , Liming Gao Date: Fri, 7 Oct 2016 14:33:06 -0700 Message-Id: <1475875986-9148-3-git-send-email-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.6.3.windows.1 In-Reply-To: <1475875986-9148-1-git-send-email-michael.d.kinney@intel.com> References: <1475875986-9148-1-git-send-email-michael.d.kinney@intel.com> Subject: [Patch 2/2] BaseTools/GenFds: Skip parse time OUTPUT_DIRECTORY file verify X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2016 21:33:14 -0000 https://bugzilla.tianocore.org/show_bug.cgi?id=132 This patch relaxes the file verification for all FILE statements to not verify the file exists during initial FDF file parsing if the file specified is in $(OUTPUT_DIRECTORY). If a file is specified does not exist when a section is processed, then a build break will occur at that time instead. Cc: Kelly Steele Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney --- BaseTools/Source/Python/GenFds/FdfParser.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py index 693128c..b7edda9 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -3022,17 +3022,17 @@ class FdfParser: ## __VerifyFile # # Check if file exists or not: - # If current phase if GenFds, the file must exist; - # If current phase is AutoGen and the file is not in $(OUTPUT_DIRECTORY), the file must exist + # If the file is not in $(OUTPUT_DIRECTORY), then the file must exist # @param FileName: File path to be verified. # def __VerifyFile(self, FileName): if FileName.replace('$(WORKSPACE)', '').find('$') != -1: return - if not GlobalData.gAutoGenPhase or not self.__GetMacroValue("OUTPUT_DIRECTORY") in FileName: - ErrorCode, ErrorInfo = PathClass(NormPath(FileName), GenFdsGlobalVariable.WorkSpaceDir).Validate() - if ErrorCode != 0: - EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo) + if self.__GetMacroValue("OUTPUT_DIRECTORY") in FileName: + return + ErrorCode, ErrorInfo = PathClass(NormPath(FileName), GenFdsGlobalVariable.WorkSpaceDir).Validate() + if ErrorCode != 0: + EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo) ## __GetCglSection() method # -- 2.6.3.windows.1