|
From: <xf...@us...> - 2012-02-27 01:46:12
|
Revision: 2488
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=2488&view=rev
Author: xfzyr
Date: 2012-02-27 01:46:05 +0000 (Mon, 27 Feb 2012)
Log Message:
-----------
Fix a issue of build breaks when there are some temp tables not cleaned in database.
Signed-off-by: yzeng15
Reviewed-by: hchen30
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/build.py
Modified: trunk/BaseTools/Source/Python/build/build.py
===================================================================
--- trunk/BaseTools/Source/Python/build/build.py 2012-02-23 04:21:54 UTC (rev 2487)
+++ trunk/BaseTools/Source/Python/build/build.py 2012-02-27 01:46:05 UTC (rev 2488)
@@ -59,6 +59,8 @@
gBuildCacheDir = "Conf/.cache"
gToolsDefinition = "Conf/tools_def.txt"
+TemporaryTablePattern = re.compile(r'^_\d+_\d+_[a-fA-F0-9]+$')
+
## Check environment PATH variable to make sure the specified tool is found
#
# If the tool is found in the PATH, then True is returned
@@ -1448,7 +1450,16 @@
if BuildTask.HasError():
EdkLogger.error("build", BUILD_ERROR, "Failed to build module", ExtraData=GlobalData.gBuildingModule)
+ #
+ # Drop temp tables to avoid database be locked.
#
+ for Key in Wa.BuildDatabase._CACHE_:
+ if Wa.BuildDatabase._CACHE_[Key]._RawData and Wa.BuildDatabase._CACHE_[Key]._RawData._Table and Wa.BuildDatabase._CACHE_[Key]._RawData._Table.Table:
+ if TemporaryTablePattern.match(Wa.BuildDatabase._CACHE_[Key]._RawData._Table.Table):
+ Wa.BuildDatabase._CACHE_[Key]._RawData._Table.Drop()
+ Wa.BuildDatabase._CACHE_[Key]._RawData._Table.Table = 0
+ #
+ #
# All modules have been put in build tasks queue. Tell task scheduler
# to exit if all tasks are completed
#
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|