diff options
author | Bob Feng <bob.c.feng@intel.com> | 2020-09-23 19:21:04 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-09-25 02:27:35 +0000 |
commit | a8c77eba374cc90860172b29a191bf47c735000b (patch) | |
tree | 7373741a9a5c7e079dab2c1bf5d641b74546ee34 /BaseTools/Source | |
parent | aec99d9bc3f7459e457e3346b493e534ccbdee8a (diff) | |
download | edk2-a8c77eba374cc90860172b29a191bf47c735000b.zip edk2-a8c77eba374cc90860172b29a191bf47c735000b.tar.gz edk2-a8c77eba374cc90860172b29a191bf47c735000b.tar.bz2 |
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 <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Reviewed-by: Yuwei Chen<yuwei.chen@intel.com>
Diffstat (limited to 'BaseTools/Source')
-rw-r--r-- | BaseTools/Source/Python/GenFds/FfsFileStatement.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/GenFds/FfsFileStatement.py b/BaseTools/Source/Python/GenFds/FfsFileStatement.py index 9fb62b0..1c6e59b 100644 --- a/BaseTools/Source/Python/GenFds/FfsFileStatement.py +++ b/BaseTools/Source/Python/GenFds/FfsFileStatement.py @@ -21,6 +21,7 @@ from .GuidSection import GuidSection from .FvImageSection import FvImageSection
from .Ffs import FdfFvFileTypeToFileType
from .GenFdsGlobalVariable import GenFdsGlobalVariable
+import shutil
## generate FFS from FILE
#
@@ -67,6 +68,8 @@ class FileStatement (FileStatementClassObject): 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)
|