From fb0f8067ea4bfe21b8bc3bd2b2617f5b3d8d87aa Mon Sep 17 00:00:00 2001 From: Hesheng Chen Date: Thu, 8 Oct 2015 09:28:15 +0000 Subject: BaseTools: Update UPT tool to support multiple workspaces Update UPT to refer MultipleWorkspace class to convert the file path from WORKSPACE and PACKAGES_PATH. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hesheng Chen Reviewed-by: Liming Gao git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18580 6f19259b-4bc3-4df7-8a09-765794883524 --- BaseTools/Source/Python/UPT/MkPkg.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'BaseTools/Source/Python/UPT/MkPkg.py') diff --git a/BaseTools/Source/Python/UPT/MkPkg.py b/BaseTools/Source/Python/UPT/MkPkg.py index 2eb84588bd..87c84f0cc2 100644 --- a/BaseTools/Source/Python/UPT/MkPkg.py +++ b/BaseTools/Source/Python/UPT/MkPkg.py @@ -50,6 +50,7 @@ from Library.ParserValidate import IsValidPath from Core.DistributionPackageClass import DistributionPackageClass from Core.PackageFile import PackageFile +from Common.MultipleWorkspace import MultipleWorkspace as mws ## CheckForExistingDp # @@ -136,7 +137,7 @@ def Main(Options = None): # write(). # FromFile = os.path.normpath(FileObject.GetURI()).encode('utf_8') - FileFullPath = os.path.normpath(os.path.join(WorkspaceDir, FromFile)) + FileFullPath = mws.join(WorkspaceDir, FromFile) if FileFullPath in RePkgDict: (DpGuid, DpVersion, DpName, Repackage) = RePkgDict[FileFullPath] if not Repackage: @@ -183,7 +184,7 @@ def Main(Options = None): DistPkg.Header.RePackage = True Cwd = getcwd() - chdir(WorkspaceDir) + chdir(WorkspaceDir) ContentFile.PackFiles(FileList) chdir(Cwd) @@ -264,7 +265,7 @@ def CheckFileList(QualifiedExt, FileList, ErrorStringExt, ErrorStringFullPath): ErrorStringExt % Item) Item = os.path.normpath(Item) - Path = os.path.normpath(os.path.join(WorkspaceDir, Item)) + Path = mws.join(WorkspaceDir, Item) if not os.path.exists(Path): Logger.Error("\nMkPkg", FILE_NOT_FOUND, ST.ERR_NOT_FOUND % Item) elif Item == Path: -- cgit v1.2.3