Reviewed-by: Yuwei Chen
> -Original Message-
> From: devel@edk2.groups.io On Behalf Of Bob
> Feng
> Sent: Wednesday, September 23, 2020 7:21 PM
> To: devel@edk2.groups.io
> Cc: Liming Gao ; Chen, Christine
>
> Subject: [edk2-devel] [Patch] BaseTools: Clean the ffs folder before
> generating files in it
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2965
>
> 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
> ---
> 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
> GuidStructureByteArrayToGuidString, SaveFileOnChange import
> Common.LongFilePathOs as os from .GuidSection import GuidSection
> from .FvImageSection import FvImageSection from .Ffs import
> FdfFvFileTypeToFileType from .GenFdsGlobalVariable import
> GenFdsGlobalVariable
> +import shutil
>
> ## generate FFS from FILE
> #
> #
> class FileStatement (FileStatementClassObject):
> @@ -65,10 +66,12 @@ class FileStatement (FileStatementClassObject):
>
> Str = self.NameGuid
> if FvName:
> Str += FvName
> OutputDir = os.path.join(GenFdsGlobalVariable.FfsDir, Str)
> +if os.path.exists(OutputDir):
> +shutil.rmtree(OutputDir)
> if not os.path.exists(OutputDir):
> os.makedirs(OutputDir)
>
> if Dict is None:
> Dict = {}
> --
> 2.20.1.windows.1
>
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#65598): https://edk2.groups.io/g/devel/message/65598
Mute This Topic: https://groups.io/mt/77032690/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-