From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2607:f8b0:4864:20::82e; helo=mail-qt1-x82e.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 74506208AE36C for ; Sat, 23 Feb 2019 02:14:21 -0800 (PST) Received: by mail-qt1-x82e.google.com with SMTP id p25so5436982qtb.3 for ; Sat, 23 Feb 2019 02:14:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=jbQ7ibALaRaYL4W3DpdO4LaxFIviIi1d1wkPy4UpR64=; b=tnblm8ot2ATPfsJMrPgTQIerc7aFQKe2n/j08BfUr88AoY9OQcRctVbNJqFjfFIe8P iP9/OSLppU0vl9aaqy7WhxVzTHX1iZUHUQvAGzuORlPZmBxp0n97oOAo0S4VoPLX1ZwL TczDN4FcLmlDBhRu9jtpAh6oVuSBMAiJZQQFz6igWuwZsGg7xnHZDaN24qr8m/D5utYm f9zdJ04DZoL7A9h10Gz7LgYugHT0b7712MLQMyIgFdTHYL/uJpGM/TnvzRVJZRLYnv0G Ph/2V9UHvQlK3XcFAV7bsMnzcc3O5l7fQfm11nqvgetbUzz9VjeagaidFOcaLIPvIW04 iivA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=jbQ7ibALaRaYL4W3DpdO4LaxFIviIi1d1wkPy4UpR64=; b=DgMXhfGll3vrH9vb1gTonvxqXdXsUWxEN2rpZSakW99G+bqkOFGI/f0ryT5epagcZz 1kixOtTj4Gwv7VQGU3wlzQ0f95wMECsTpIJ10QSMA5W13eNqJZifA50J6DGPhQ+2yBPY S9vqZiY9/Va0saFw2+Ocn70B0IMooIwZoh1rFsCevEhxakR/YHlHrTuueao0MzMdTac2 rZeGUJViSEeE+A7ZNRmrcwDEIYuu/abxSbKTjtGgWi5DKb0TvlUTmFHTmHJ7CvN8JBRj 2Sod6bsUZpqZzx6NcbhO6EgEfnzBR3ycuJye3jFguxrOtDdMnGt2HaimHaCebcTTtntZ WPbw== X-Gm-Message-State: AHQUAubwk7vjuqEE/zM4eUffLbXbu+uO9od09sNfi7dTdKdu1NuP3FMW 6RkIsIWfvlhRf2em4VO7sJzDT6xBX4iM7a9Rq4f6Qw== X-Google-Smtp-Source: AHgI3IaYpoLXxn24M7z6PtBnYI4asjmBStXsq/ZDINgLARL0v3fYeaI/NOkeR60pWZXzeDlT9UZm0AVMZSohTdfKqR8= X-Received: by 2002:ac8:2906:: with SMTP id y6mr6444698qty.42.1550916859586; Sat, 23 Feb 2019 02:14:19 -0800 (PST) MIME-Version: 1.0 References: <20190220152131.12008-1-bob.c.feng@intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E3E5E20@SHSMSX104.ccr.corp.intel.com> In-Reply-To: From: Marcin Wojtas Date: Sat, 23 Feb 2019 11:14:05 +0100 Message-ID: To: Laszlo Ersek Cc: Ard Biesheuvel , "Gao, Liming" , Leif Lindholm , "Feng, Bob C" , "edk2-devel@lists.01.org" Subject: Re: [Patch V2] BaseTool: Fixed incremental rebuild 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: Sat, 23 Feb 2019 10:14:21 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Laszlo, pt., 22 lut 2019 o 21:08 Laszlo Ersek napisa=C5=82(a): > > On 02/22/19 20:21, Ard Biesheuvel wrote: > > On Fri, 22 Feb 2019 at 08:26, Gao, Liming wrote: > >> > >> Reviewed-by: Liming Gao > >> > > > > Incremental builds are still broken for me, even with this patch. Is > > anyone else seeing the same? > > I am not; but I've been using Python3.4 for a while now (it is needed by > another package on my system, and then the build tools find it too). > > The regression is attributed to commit d943b0c339fe ("BaseTools: Handle > the bytes and str difference", 2019-02-01), which I believe is related > to the python2/3 conversion. So I assume python3.4 masks the problem. > In my setup with the latest BaseTools update this problem is gone. I'm using Python 3.5.2. Thanks, Marcin > > >>> -----Original Message----- > >>> From: Feng, Bob C > >>> Sent: Wednesday, February 20, 2019 11:22 PM > >>> To: edk2-devel@lists.01.org > >>> Cc: Feng, Bob C ; Gao, Liming > >>> Subject: [Patch V2] BaseTool: Fixed incremental rebuild issue. > >>> > >>> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1540 > >>> > >>> This issue in introduced by commit > >>> d943b0c339fe3d35ffdf9f580ccb7a55915c6854 > >>> > >>> To convert bytes to string, we need to use bytes.decode() > >>> instead of using str(bytes). > >>> > >>> If the source file is not a txt file, ignore that file. > >>> > >>> Contributed-under: TianoCore Contribution Agreement 1.1 > >>> Signed-off-by: Bob Feng > >>> Cc: Liming Gao > >>> --- > >>> BaseTools/Source/Python/AutoGen/GenMake.py | 16 ++++++++-------- > >>> .../Source/Python/Workspace/DscBuildData.py | 17 ++++++++--------= - > >>> 2 files changed, 16 insertions(+), 17 deletions(-) > >>> > >>> diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py > >>> b/BaseTools/Source/Python/AutoGen/GenMake.py > >>> index 53c5b8577d..b441817b52 100644 > >>> --- a/BaseTools/Source/Python/AutoGen/GenMake.py > >>> +++ b/BaseTools/Source/Python/AutoGen/GenMake.py > >>> @@ -1043,18 +1043,18 @@ cleanlib: > >>> Fd.close() > >>> except BaseException as X: > >>> EdkLogger.error("build", FILE_OPEN_FAILURE, Extra= Data=3DF.Path + > >>> "\n\t" + str(X)) > >>> if len(FileContent) =3D=3D 0: > >>> continue > >>> - > >>> - if FileContent[0] =3D=3D 0xff or FileContent[0] =3D= =3D 0xfe: > >>> - FileContent =3D FileContent.decode('utf-16') > >>> - else: > >>> - try: > >>> - FileContent =3D str(FileContent) > >>> - except: > >>> - pass > >>> + try: > >>> + if FileContent[0] =3D=3D 0xff or FileContent[0] = =3D=3D 0xfe: > >>> + FileContent =3D FileContent.decode('utf-16') > >>> + else: > >>> + FileContent =3D FileContent.decode() > >>> + except: > >>> + # The file is not txt file. for example .mcb fil= e > >>> + continue > >>> IncludedFileList =3D gIncludePattern.findall(FileCont= ent) > >>> > >>> for Inc in IncludedFileList: > >>> Inc =3D Inc.strip() > >>> # if there's macro used to reference header file,= expand it > >>> diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py > >>> b/BaseTools/Source/Python/Workspace/DscBuildData.py > >>> index 1ffefe6e7e..7221946062 100644 > >>> --- a/BaseTools/Source/Python/Workspace/DscBuildData.py > >>> +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py > >>> @@ -153,19 +153,18 @@ def GetDependencyList(FileStack, SearchPathList= ): > >>> Fd.close() > >>> > >>> if len(FileContent) =3D=3D 0: > >>> continue > >>> > >>> - if FileContent[0] =3D=3D 0xff or FileContent[0] =3D=3D 0= xfe: > >>> - FileContent =3D FileContent.decode('utf-16') > >>> - IncludedFileList =3D gIncludePattern.findall(FileCon= tent) > >>> - else: > >>> - try: > >>> - FileContent =3D str(FileContent) > >>> - IncludedFileList =3D gIncludePattern.findall(Fil= eContent) > >>> - except: > >>> - pass > >>> + try: > >>> + if FileContent[0] =3D=3D 0xff or FileContent[0] =3D= =3D 0xfe: > >>> + 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) > >>> > >>> for Inc in IncludedFileList: > >>> Inc =3D Inc.strip() > >>> Inc =3D os.path.normpath(Inc) > >>> -- > >>> 2.18.0.windows.1 > >> > >> _______________________________________________ > >> edk2-devel mailing list > >> edk2-devel@lists.01.org > >> https://lists.01.org/mailman/listinfo/edk2-devel >