From nobody Fri May 3 23:11:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+47702+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+47702+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1568959226; cv=none; d=zoho.com; s=zohoarc; b=k4TXd5g9yG51u+WvIy7/3FCxVwTmyIV0t7EOZd5NsT2RVolZ/j4x0SJakuSxyUaVvE4JRazW0eT0V1QbfmW3o3Iz/vXD14Kf6M08M7MjcwzQEjF/bLzjSgwPFJFVRljweboRG2Ph3SGApGqb1f4FeAraIv9XcxjjbpTNsqqTaUQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568959226; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To:ARC-Authentication-Results; bh=GjMyGcKK6DNKuQw6JncLyDbj656Cm21DHc8yuOLyUF4=; b=LGNxwALRNS7sYpDgkcI6evvbW8dvGLH+Ih3Csufqzd3HlCIJz31vKW2JjLvMqpxEieRoEzdfUYbWrMONBn/YxKhLM8ZIAWZnEZZ4hMQj2MdMU7fnpsgpOZJWeDDMxGOhXxfIyHKqWdtnwG6pKa7TqSfQ1ijbNPWywrXNQo7cDd0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+47702+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1568959226244317.1324484974434; Thu, 19 Sep 2019 23:00:26 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id IebWYY1788612xSb5bY96WaP; Thu, 19 Sep 2019 23:00:25 -0700 X-Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by groups.io with SMTP; Thu, 19 Sep 2019 23:00:24 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Sep 2019 23:00:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,527,1559545200"; d="scan'208";a="387513218" X-Received: from lgao4-mobl1.ccr.corp.intel.com ([10.249.172.70]) by fmsmga005.fm.intel.com with ESMTP; 19 Sep 2019 23:00:20 -0700 From: "Liming Gao" To: devel@edk2.groups.io Cc: Bob Feng Subject: [edk2-devel] [Patch] Revert "BaseTools: Improve GetDependencyList function" Date: Fri, 20 Sep 2019 14:00:12 +0800 Message-Id: <20190920060012.16248-1-liming.gao@intel.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,liming.gao@intel.com X-Gm-Message-State: EV04iEf3ieHn63AhbHaSZ7ANx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1568959225; bh=BSC3SlUpRy1KP5nA5M4tts8qku7AxOa7s8SGi7Sp/08=; h=Cc:Date:From:Reply-To:Subject:To; b=O0e7CSnap/5khJj8wX0dBnf9w+N4lxCgr6M3UdgeM7M1mgFlBIe2fN9m41wPuWgYplj nMyt05m7vx8B9hDsVVL44d9yYbAFHwZR0vy/xTaah4akAbBJBRdgy5akVVEGpVXi46BhJ Xct0qGxol9ZusjA0Z2dkeSBAc/XsFjQ7zRE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This reverts commit bc9e4194cf3edaf9524c83098ba3f72008c70190. This change causes the dependent header files are missing in Makefile. It makes the incremental build not work. So, revert this change. Cc: Bob Feng Signed-off-by: Liming Gao Reviewed-by: Bob Feng --- BaseTools/Source/Python/AutoGen/GenMake.py | 29 +++++++++++++-------------= --- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/= Python/AutoGen/GenMake.py index 940136248f..2fe0e78bec 100755 --- a/BaseTools/Source/Python/AutoGen/GenMake.py +++ b/BaseTools/Source/Python/AutoGen/GenMake.py @@ -1696,25 +1696,22 @@ def GetDependencyList(AutoGenObject, FileCache, Fil= e, ForceList, SearchPathList) CurrentFileDependencyList =3D DepDb[F] else: try: - with open(F.Path, 'rb') as Fd: - FileContent =3D Fd.read(1) - Fd.seek(0) - if not FileContent: - continue - if FileContent[0] =3D=3D 0xff or FileContent[0] =3D=3D= 0xfe: - FileContent2 =3D Fd.read() - FileContent2 =3D FileContent2.decode('utf-16') - IncludedFileList =3D gIncludePattern.findall(FileC= ontent2) - else: - FileLines =3D Fd.readlines() - FileContent2 =3D [line for line in FileLines if st= r(line).lstrip("#\t ")[:8] =3D=3D "include "] - simpleFileContent=3D"".join(FileContent2) - - IncludedFileList =3D gIncludePattern.findall(simpl= eFileContent) + Fd =3D open(F.Path, 'rb') + FileContent =3D Fd.read() + Fd.close() except BaseException as X: EdkLogger.error("build", FILE_OPEN_FAILURE, ExtraData=3DF.= Path + "\n\t" + str(X)) - if not FileContent: + if len(FileContent) =3D=3D 0: + continue + try: + if FileContent[0] =3D=3D 0xff or FileContent[0] =3D=3D 0xf= e: + FileContent =3D FileContent.decode('utf-16') + else: + FileContent =3D FileContent.decode() + except: + # The file is not txt file. for example .mcb file continue + IncludedFileList =3D gIncludePattern.findall(FileContent) =20 for Inc in IncludedFileList: Inc =3D Inc.strip() --=20 2.13.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#47702): https://edk2.groups.io/g/devel/message/47702 Mute This Topic: https://groups.io/mt/34227614/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-