]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/UPT/Library/Parsing.py
BaseTools: Update UPT tool to support multiple workspaces
[mirror_edk2.git] / BaseTools / Source / Python / UPT / Library / Parsing.py
index ace3e0d11841a0e1cdaeed7d32a364e701147722..c34e7751442ab542ac14c52e1fde7e788d7d109c 100644 (file)
@@ -827,21 +827,23 @@ def GetPkgInfoFromDec(Path):
 def GetWorkspacePackage():\r
     DecFileList = []\r
     WorkspaceDir = GlobalData.gWORKSPACE\r
-    for Root, Dirs, Files in os.walk(WorkspaceDir):\r
-        if 'CVS' in Dirs:\r
-            Dirs.remove('CVS')\r
-        if '.svn' in Dirs:\r
-            Dirs.remove('.svn')\r
-        for Dir in Dirs:\r
-            if Dir.startswith('.'):\r
-                Dirs.remove(Dir)\r
-        for FileSp in Files:\r
-            if FileSp.startswith('.'):\r
-                continue\r
-            Ext = os.path.splitext(FileSp)[1]\r
-            if Ext.lower() in ['.dec']:\r
-                DecFileList.append\\r
-                (os.path.normpath(os.path.join(Root, FileSp)))\r
+    PackageDir = GlobalData.gPACKAGE_PATH\r
+    for PkgRoot in [WorkspaceDir] + PackageDir:\r
+        for Root, Dirs, Files in os.walk(PkgRoot):\r
+            if 'CVS' in Dirs:\r
+                Dirs.remove('CVS')\r
+            if '.svn' in Dirs:\r
+                Dirs.remove('.svn')\r
+            for Dir in Dirs:\r
+                if Dir.startswith('.'):\r
+                    Dirs.remove(Dir)\r
+            for FileSp in Files:\r
+                if FileSp.startswith('.'):\r
+                    continue\r
+                Ext = os.path.splitext(FileSp)[1]\r
+                if Ext.lower() in ['.dec']:\r
+                    DecFileList.append\\r
+                    (os.path.normpath(os.path.join(Root, FileSp)))\r
     #\r
     # abstract package guid, version info from DecFile List\r
     #\r