summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYingke Liu <yingke.d.liu@intel.com>2014-11-12 08:26:03 +0000
committeryingke <yingke@Edk2>2014-11-12 08:26:03 +0000
commitbcbdc75535d376d710cd864fb3cf5129c7dfcaff (patch)
tree8f859c7645d956ba7a1078d70094ffbb11e142be
parent6da5153cfcb6c3f04226183deeb242ca7ffad678 (diff)
downloadedk2-bcbdc75535d376d710cd864fb3cf5129c7dfcaff.tar.gz
edk2-bcbdc75535d376d710cd864fb3cf5129c7dfcaff.tar.bz2
edk2-bcbdc75535d376d710cd864fb3cf5129c7dfcaff.zip
BaseTools: Fix a cleanall issue.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu <yingke.d.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16338 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--BaseTools/Source/Python/build/build.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index e9baf3465e..7d68b45417 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -997,11 +997,6 @@ class Build():
try:
#os.rmdir(AutoGenObject.BuildDir)
RemoveDirectory(AutoGenObject.BuildDir, True)
- #
- # First should close DB.
- #
- self.Db.Close()
- RemoveDirectory(os.path.dirname(GlobalData.gDatabasePath), True)
except WindowsError, X:
EdkLogger.error("build", FILE_DELETE_FAILURE, ExtraData=str(X))
return True
@@ -1091,11 +1086,6 @@ class Build():
try:
#os.rmdir(AutoGenObject.BuildDir)
RemoveDirectory(AutoGenObject.BuildDir, True)
- #
- # First should close DB.
- #
- self.Db.Close()
- RemoveDirectory(os.path.dirname(GlobalData.gDatabasePath), True)
except WindowsError, X:
EdkLogger.error("build", FILE_DELETE_FAILURE, ExtraData=str(X))
return True
@@ -1805,6 +1795,10 @@ class Build():
self.SpawnMode = False
self._BuildModule()
+ if self.Target == 'cleanall':
+ self.Db.Close()
+ RemoveDirectory(os.path.dirname(GlobalData.gDatabasePath), True)
+
def CreateAsBuiltInf(self):
for Module in self.BuildModules:
Module.CreateAsBuiltInf()