diff options
author | Yingke Liu <yingke.d.liu@intel.com> | 2014-11-12 08:26:03 +0000 |
---|---|---|
committer | yingke <yingke@Edk2> | 2014-11-12 08:26:03 +0000 |
commit | bcbdc75535d376d710cd864fb3cf5129c7dfcaff (patch) | |
tree | 8f859c7645d956ba7a1078d70094ffbb11e142be | |
parent | 6da5153cfcb6c3f04226183deeb242ca7ffad678 (diff) | |
download | edk2-platforms-bcbdc75535d376d710cd864fb3cf5129c7dfcaff.tar.xz |
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.py | 14 |
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()
|