From nobody Fri May 3 06:39:45 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+65528+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65528+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1600860077; cv=none; d=zohomail.com; s=zohoarc; b=UOudoZrQiUlgZihs+GoypBPJPezBG/hFow+c74RAma2P7e6yMjihwY9Y39Mqb0AaOord9A4x4inBw5NBsuOlbzi2koqTTkYT70lhrA484dBgSydlUecXK61VvTvEXN5pjWue7Z0l+lfV4fjLwjNN6T3Vz+cmmJN7hsnuQBTFj7c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600860077; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=NGid8ZCk9D7fKd7eQMA16qok+AO0wXOwqheLeHrqVKI=; b=ieKDLhF0Z2pwl61xq0ExA5iYfkFm+hSLGezqrwNaaWggW92tUY1OHn9TiNin24KFNlgYCN/3gDDZs1bqlSOdWrNlpW7p77QbKJORfFCe9e6610ZiWxZBCOpLsexNB67+19H49Z7CrJGKeXxsdZpu7MS1JXoJlCSll6AAoIE9ZRg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65528+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 1600860077267518.0420922024236; Wed, 23 Sep 2020 04:21:17 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id GXJ6YY1788612xvTpFEinvQW; Wed, 23 Sep 2020 04:21:16 -0700 X-Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web10.11017.1600860075952916845 for ; Wed, 23 Sep 2020 04:21:16 -0700 IronPort-SDR: eKKJ33FKvaGUsrEPn/o9KKJ3Vj/PvcMrzBjJtlt4cwzFB0mWJtj/i77zgJRu5SWw0axswrrZbz /rA/aabPJEDw== X-IronPort-AV: E=McAfee;i="6000,8403,9752"; a="161796532" X-IronPort-AV: E=Sophos;i="5.77,293,1596524400"; d="scan'208";a="161796532" 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 orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2020 04:21:14 -0700 IronPort-SDR: ZLHvqOyGwfqi6cpU4q5EmZc8UJpUPg4WR9j8H00blmWrVm4COc7QqAvU+E4FP526RN8jG1/2xR lRdokYSVkN6w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,293,1596524400"; d="scan'208";a="511611258" X-Received: from shwdepsi1121.ccr.corp.intel.com ([10.239.158.66]) by fmsmga005.fm.intel.com with ESMTP; 23 Sep 2020 04:21:13 -0700 From: "Bob Feng" To: devel@edk2.groups.io Cc: Liming Gao , Yuwei Chen Subject: [edk2-devel] [Patch] BaseTools: Clean the ffs folder before generating files in it Date: Wed, 23 Sep 2020 19:21:04 +0800 Message-Id: <20200923112104.47012-1-bob.c.feng@intel.com> MIME-Version: 1.0 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,bob.c.feng@intel.com X-Gm-Message-State: KLb9JfYOQfZhkuNHz0IMbshFx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1600860076; bh=TcCy2DP4jZxPaWZDBUYnlbf2qwwT0iKwBzW1aiWIWEA=; h=Cc:Date:From:Reply-To:Subject:To; b=rWbaQXVdVnu3+gjP2cdvqQNl0aFWmSjkcgE1mtmwwyLr6DSaXELprvaQTy/QVUZKVoR /beXuM9f02vAhcVR1n+aaupXuv7IwASPFR4YMEqjRmIkQtdb6VkLkb2QVi5J9XK9frB10 xx8X0nFpvdlAKnEj2Bv12DKLYsJfEn5tGms= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2965 The content in Guid.xref depends on the files under the corresponding ffs folder.(refer to the commit 5e9256cd7f54ffd6f1fd9837df92a911fcd2d7c2) To make Guid.xref update in the incremental build, clean the files under that ffs folder before generating files in it. Signed-off-by: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Reviewed-by: Yuwei Chen --- BaseTools/Source/Python/GenFds/FfsFileStatement.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BaseTools/Source/Python/GenFds/FfsFileStatement.py b/BaseTools= /Source/Python/GenFds/FfsFileStatement.py index 9fb62b0a91..1c6e59bac7 100644 --- a/BaseTools/Source/Python/GenFds/FfsFileStatement.py +++ b/BaseTools/Source/Python/GenFds/FfsFileStatement.py @@ -19,10 +19,11 @@ from Common.Misc import GuidStructureByteArrayToGuidStr= ing, SaveFileOnChange import Common.LongFilePathOs as os from .GuidSection import GuidSection from .FvImageSection import FvImageSection from .Ffs import FdfFvFileTypeToFileType from .GenFdsGlobalVariable import GenFdsGlobalVariable +import shutil =20 ## generate FFS from FILE # # class FileStatement (FileStatementClassObject): @@ -65,10 +66,12 @@ class FileStatement (FileStatementClassObject): =20 Str =3D self.NameGuid if FvName: Str +=3D FvName OutputDir =3D os.path.join(GenFdsGlobalVariable.FfsDir, Str) + if os.path.exists(OutputDir): + shutil.rmtree(OutputDir) if not os.path.exists(OutputDir): os.makedirs(OutputDir) =20 if Dict is None: Dict =3D {} --=20 2.20.1.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 (#65528): https://edk2.groups.io/g/devel/message/65528 Mute This Topic: https://groups.io/mt/77032690/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-