]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/DepexSection.py
License header updated to match correct format.
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / DepexSection.py
index 8650a73eb590fb96c5895f3bdf8b666f718692e8..8f78c0fad474fb38829160b94cd3331c4127dea1 100644 (file)
@@ -1,9 +1,9 @@
 ## @file\r
 # process depex section generation\r
 #\r
-#  Copyright (c) 2007, Intel Corporation\r
+#  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
 #\r
-#  All rights reserved. This program and the accompanying materials\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
@@ -19,12 +19,12 @@ import Section
 from GenFdsGlobalVariable import GenFdsGlobalVariable\r
 import subprocess\r
 from Ffs import Ffs\r
-import os\r
+import Common.LongFilePathOs as os\r
 from CommonDataClass.FdfClass import DepexSectionClassObject\r
 from AutoGen.GenDepex import DependencyExpression\r
-import shutil\r
 from Common import EdkLogger\r
 from Common.BuildToolError import *\r
+from Common.Misc import PathClass\r
 \r
 ## generate data section\r
 #\r
@@ -39,7 +39,22 @@ class DepexSection (DepexSectionClassObject):
 \r
     def __FindGuidValue(self, CName):\r
         for Arch in GenFdsGlobalVariable.ArchList:\r
-            for PkgDb in GenFdsGlobalVariable.WorkSpace.PackageList:\r
+            PkgList = GenFdsGlobalVariable.WorkSpace.GetPackageList(GenFdsGlobalVariable.ActivePlatform,\r
+                                                                    Arch,\r
+                                                                    GenFdsGlobalVariable.TargetName,\r
+                                                                    GenFdsGlobalVariable.ToolChainTag)\r
+            for Inf in GenFdsGlobalVariable.FdfParser.Profile.InfList:\r
+                ModuleFile = PathClass(Inf, GenFdsGlobalVariable.WorkSpaceDir)\r
+                ModuleData = GenFdsGlobalVariable.WorkSpace.BuildObject[\r
+                                                            ModuleFile,\r
+                                                            Arch,\r
+                                                            GenFdsGlobalVariable.TargetName,\r
+                                                            GenFdsGlobalVariable.ToolChainTag\r
+                                                            ]\r
+                for Pkg in ModuleData.Packages:\r
+                    if Pkg not in PkgList:\r
+                        PkgList.append(Pkg)\r
+            for PkgDb in PkgList:\r
                 if CName in PkgDb.Ppis:\r
                     return PkgDb.Ppis[CName]\r
                 if CName in PkgDb.Protocols:\r