1. Add the path of inf file itself to include path list of function GetIncludeListOfFile
authorhche10x <hche10x@7335b38e-4728-0410-8992-fb3ffe349368>
Wed, 11 Jun 2008 05:39:00 +0000 (05:39 +0000)
committerhche10x <hche10x@7335b38e-4728-0410-8992-fb3ffe349368>
Wed, 11 Jun 2008 05:39:00 +0000 (05:39 +0000)
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@1253 7335b38e-4728-0410-8992-fb3ffe349368

Source/Python/Ecc/MetaDataParser.py

index cab6f0c..fb4239f 100644 (file)
@@ -25,20 +25,23 @@ def GetIncludeListOfFile(WorkSpace, Filepath, Db):
     IncludeList = []\r
     Filepath = os.path.normpath(Filepath)\r
     SqlCommand = """\r
-                select Value1 from Inf where Model = %s and BelongsToFile in(\r
+                select Value1, FullPath from Inf, File where Inf.Model = %s and Inf.BelongsToFile in(\r
                     select distinct B.BelongsToFile from File as A left join Inf as B \r
-                        where A.ID = B.BelongsToFile and B.Model = %s and (A.Path || '%s' || B.Value1) = '%s')""" \\r
+                        where A.ID = B.BelongsToFile and B.Model = %s and (A.Path || '%s' || B.Value1) = '%s')\r
+                        and Inf.BelongsToFile = File.ID""" \\r
                 % (MODEL_META_DATA_PACKAGE, MODEL_EFI_SOURCE_FILE, '\\', Filepath)\r
     RecordSet = Db.TblFile.Exec(SqlCommand)\r
     for Record in RecordSet:\r
         DecFullPath = os.path.normpath(os.path.join(WorkSpace, Record[0]))\r
+        InfFullPath = os.path.normpath(os.path.join(WorkSpace, Record[1]))\r
         (DecPath, DecName) = os.path.split(DecFullPath)\r
+        (InfPath, InfName) = os.path.split(InfFullPath)\r
         SqlCommand = """select Value1 from Dec where BelongsToFile = \r
                            (select ID from File where FullPath = '%s') and Model = %s""" \\r
                     % (DecFullPath, MODEL_EFI_INCLUDE)\r
         NewRecordSet = Db.TblDec.Exec(SqlCommand)\r
-        if DecPath not in IncludeList:\r
-            IncludeList.append(DecPath)\r
+        if InfPath not in IncludeList:\r
+            IncludeList.append(InfPath)\r
         for NewRecord in NewRecordSet:\r
             IncludePath = os.path.normpath(os.path.join(DecPath, NewRecord[0]))\r
             if IncludePath not in IncludeList:\r