]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Workspace/MetaFileTable.py
BaseTools: Not compare the VOID* difference in the DSC and DEC file
[mirror_edk2.git] / BaseTools / Source / Python / Workspace / MetaFileTable.py
index f528c1ee6642a8355192843f0966c42db8f00bce..89fe97d60a324ed98682b90db1179fd6fd15576c 100644 (file)
@@ -19,8 +19,8 @@ import uuid
 import Common.EdkLogger as EdkLogger\r
 from Common.BuildToolError import FORMAT_INVALID\r
 \r
-from MetaDataTable import Table, TableFile\r
-from MetaDataTable import ConvertToSqlString\r
+from .MetaDataTable import Table, TableFile\r
+from .MetaDataTable import ConvertToSqlString\r
 from CommonDataClass.DataClass import MODEL_FILE_DSC, MODEL_FILE_DEC, MODEL_FILE_INF, \\r
                                       MODEL_FILE_OTHERS\r
 from Common.DataType import *\r
@@ -56,7 +56,7 @@ class MetaFileTable(Table):
             Result = self.Cur.execute("select ID from %s where ID<0" % (self.Table)).fetchall()\r
             if not Result:\r
                 # update the timestamp in database\r
-                self._FileIndexTable.SetFileTimeStamp(self.IdBase, TimeStamp)                \r
+                self._FileIndexTable.SetFileTimeStamp(self.IdBase, TimeStamp)\r
                 return False\r
 \r
             if TimeStamp != self._FileIndexTable.GetFileTimeStamp(self.IdBase):\r
@@ -113,28 +113,28 @@ class ModuleTable(MetaFileTable):
                BelongsToItem=-1, StartLine=-1, StartColumn=-1, EndLine=-1, EndColumn=-1, Enabled=0):\r
         (Value1, Value2, Value3, Scope1, Scope2) = ConvertToSqlString((Value1, Value2, Value3, Scope1, Scope2))\r
         return Table.Insert(\r
-                        self, \r
-                        Model, \r
-                        Value1, \r
-                        Value2, \r
-                        Value3, \r
-                        Scope1, \r
+                        self,\r
+                        Model,\r
+                        Value1,\r
+                        Value2,\r
+                        Value3,\r
+                        Scope1,\r
                         Scope2,\r
-                        BelongsToItem, \r
-                        StartLine, \r
-                        StartColumn, \r
-                        EndLine, \r
-                        EndColumn, \r
+                        BelongsToItem,\r
+                        StartLine,\r
+                        StartColumn,\r
+                        EndLine,\r
+                        EndColumn,\r
                         Enabled\r
                         )\r
 \r
     ## Query table\r
     #\r
-    # @param    Model:      The Model of Record \r
-    # @param    Arch:       The Arch attribute of Record \r
-    # @param    Platform    The Platform attribute of Record \r
+    # @param    Model:      The Model of Record\r
+    # @param    Arch:       The Arch attribute of Record\r
+    # @param    Platform    The Platform attribute of Record\r
     #\r
-    # @retval:       A recordSet of all found records \r
+    # @retval:       A recordSet of all found records\r
     #\r
     def Query(self, Model, Arch=None, Platform=None, BelongsToItem=None):\r
         ConditionString = "Model=%s AND Enabled>=0" % Model\r
@@ -195,27 +195,27 @@ class PackageTable(MetaFileTable):
                BelongsToItem=-1, StartLine=-1, StartColumn=-1, EndLine=-1, EndColumn=-1, Enabled=0):\r
         (Value1, Value2, Value3, Scope1, Scope2) = ConvertToSqlString((Value1, Value2, Value3, Scope1, Scope2))\r
         return Table.Insert(\r
-                        self, \r
-                        Model, \r
-                        Value1, \r
-                        Value2, \r
-                        Value3, \r
-                        Scope1, \r
+                        self,\r
+                        Model,\r
+                        Value1,\r
+                        Value2,\r
+                        Value3,\r
+                        Scope1,\r
                         Scope2,\r
-                        BelongsToItem, \r
-                        StartLine, \r
-                        StartColumn, \r
-                        EndLine, \r
-                        EndColumn, \r
+                        BelongsToItem,\r
+                        StartLine,\r
+                        StartColumn,\r
+                        EndLine,\r
+                        EndColumn,\r
                         Enabled\r
                         )\r
 \r
     ## Query table\r
     #\r
-    # @param    Model:  The Model of Record \r
-    # @param    Arch:   The Arch attribute of Record \r
+    # @param    Model:  The Model of Record\r
+    # @param    Arch:   The Arch attribute of Record\r
     #\r
-    # @retval:       A recordSet of all found records \r
+    # @retval:       A recordSet of all found records\r
     #\r
     def Query(self, Model, Arch=None):\r
         ConditionString = "Model=%s AND Enabled>=0" % Model\r
@@ -236,7 +236,7 @@ class PackageTable(MetaFileTable):
         try:\r
             for row in self.Cur:\r
                 comment = row[0]\r
-                \r
+\r
                 LineNum = row[1]\r
                 comment = comment.strip("#")\r
                 comment = comment.strip()\r
@@ -310,32 +310,32 @@ class PlatformTable(MetaFileTable):
                FromItem=-1, StartLine=-1, StartColumn=-1, EndLine=-1, EndColumn=-1, Enabled=1):\r
         (Value1, Value2, Value3, Scope1, Scope2, Scope3) = ConvertToSqlString((Value1, Value2, Value3, Scope1, Scope2, Scope3))\r
         return Table.Insert(\r
-                        self, \r
-                        Model, \r
-                        Value1, \r
-                        Value2, \r
-                        Value3, \r
-                        Scope1, \r
+                        self,\r
+                        Model,\r
+                        Value1,\r
+                        Value2,\r
+                        Value3,\r
+                        Scope1,\r
                         Scope2,\r
                         Scope3,\r
-                        BelongsToItem, \r
+                        BelongsToItem,\r
                         FromItem,\r
-                        StartLine, \r
-                        StartColumn, \r
-                        EndLine, \r
-                        EndColumn, \r
+                        StartLine,\r
+                        StartColumn,\r
+                        EndLine,\r
+                        EndColumn,\r
                         Enabled\r
                         )\r
 \r
     ## Query table\r
     #\r
-    # @param Model:          The Model of Record \r
+    # @param Model:          The Model of Record\r
     # @param Scope1:         Arch of a Dsc item\r
     # @param Scope2:         Module type of a Dsc item\r
     # @param BelongsToItem:  The item belongs to which another item\r
     # @param FromItem:       The item belongs to which dsc file\r
     #\r
-    # @retval:       A recordSet of all found records \r
+    # @retval:       A recordSet of all found records\r
     #\r
     def Query(self, Model, Scope1=None, Scope2=None, BelongsToItem=None, FromItem=None):\r
         ConditionString = "Model=%s AND Enabled>0" % Model\r