]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Ecc/Database.py
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / BaseTools / Source / Python / Ecc / Database.py
index 4b79cb708fab74265139c26e99943eae7a8f8d1d..a5b70c52029b4ac97f53816a2bef6289b7da7cd9 100644 (file)
@@ -1,21 +1,16 @@
 ## @file\r
 # This file is used to create a database used by ECC tool\r
 #\r
-# Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
-# This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution.  The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
 #\r
 \r
 ##\r
 # Import Modules\r
 #\r
+from __future__ import absolute_import\r
 import sqlite3\r
-import os, time\r
+import Common.LongFilePathOs as os, time\r
 \r
 import Common.EdkLogger as EdkLogger\r
 import CommonDataClass.DataClass as DataClass\r
@@ -26,9 +21,9 @@ from Table.TableFunction import TableFunction
 from Table.TablePcd import TablePcd\r
 from Table.TableIdentifier import TableIdentifier\r
 from Table.TableReport import TableReport\r
-from Table.TableInf import TableInf\r
-from Table.TableDec import TableDec\r
-from Table.TableDsc import TableDsc\r
+from Ecc.MetaFileWorkspace.MetaFileTable import ModuleTable\r
+from Ecc.MetaFileWorkspace.MetaFileTable import PackageTable\r
+from Ecc.MetaFileWorkspace.MetaFileTable import PlatformTable\r
 from Table.TableFdf import TableFdf\r
 \r
 ##\r
@@ -38,7 +33,7 @@ DATABASE_PATH = "Ecc.db"
 \r
 ## Database\r
 #\r
-# This class defined the ECC databse\r
+# This class defined the ECC database\r
 # During the phase of initialization, the database will create all tables and\r
 # insert all records of table DataModel\r
 #\r
@@ -82,7 +77,7 @@ class Database(object):
         self.Conn = sqlite3.connect(self.DbPath, isolation_level = 'DEFERRED')\r
         self.Conn.execute("PRAGMA page_size=4096")\r
         self.Conn.execute("PRAGMA synchronous=OFF")\r
-        # to avoid non-ascii charater conversion error\r
+        # to avoid non-ascii character conversion error\r
         self.Conn.text_factory = str\r
         self.Cur = self.Conn.cursor()\r
 \r
@@ -92,9 +87,9 @@ class Database(object):
         self.TblIdentifier = TableIdentifier(self.Cur)\r
         self.TblPcd = TablePcd(self.Cur)\r
         self.TblReport = TableReport(self.Cur)\r
-        self.TblInf = TableInf(self.Cur)\r
-        self.TblDec = TableDec(self.Cur)\r
-        self.TblDsc = TableDsc(self.Cur)\r
+        self.TblInf = ModuleTable(self.Cur)\r
+        self.TblDec = PackageTable(self.Cur)\r
+        self.TblDsc = PlatformTable(self.Cur)\r
         self.TblFdf = TableFdf(self.Cur)\r
 \r
         #\r
@@ -213,7 +208,7 @@ class Database(object):
 \r
     ## UpdateIdentifierBelongsToFunction\r
     #\r
-    # Update the field "BelongsToFunction" for each Indentifier\r
+    # Update the field "BelongsToFunction" for each Identifier\r
     #\r
     #\r
     def UpdateIdentifierBelongsToFunction_disabled(self):\r
@@ -266,7 +261,7 @@ class Database(object):
 \r
     ## UpdateIdentifierBelongsToFunction\r
     #\r
-    # Update the field "BelongsToFunction" for each Indentifier\r
+    # Update the field "BelongsToFunction" for each Identifier\r
     #\r
     #\r
     def UpdateIdentifierBelongsToFunction(self):\r