From nobody Fri Dec 27 02:35:11 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1502354217205547.0189793971025; Thu, 10 Aug 2017 01:36:57 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id BA8F42095DE53; Thu, 10 Aug 2017 01:34:35 -0700 (PDT) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D0F2A21A143C1 for ; Thu, 10 Aug 2017 01:34:33 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Aug 2017 01:36:52 -0700 Received: from tiano01.ccr.corp.intel.com ([10.239.9.150]) by orsmga003.jf.intel.com with ESMTP; 10 Aug 2017 01:36:51 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,352,1498546800"; d="scan'208";a="1002045519" From: hesschen To: edk2-devel@lists.01.org Date: Thu, 10 Aug 2017 16:36:47 +0800 Message-Id: <1502354207-13864-1-git-send-email-hesheng.chen@intel.com> X-Mailer: git-send-email 2.7.2.windows.1 Subject: [edk2] [patch] BaseTools/UPT: Support Multiple Installation X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add a new feature to UPT to support installing multiple DIST packages in one time. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: hesschen Reviewed-by: Yonghong Zhu =20 --- .../Source/Python/UPT/Core/DependencyRules.py | 18 ++++- .../Python/UPT/GenMetaFile/GenMetaFileMisc.py | 90 +++++++++++++-----= --- BaseTools/Source/Python/UPT/InstallPkg.py | 94 +++++++++++-------= ---- BaseTools/Source/Python/UPT/Library/GlobalData.py | 9 ++- BaseTools/Source/Python/UPT/Logger/StringTable.py | 4 +- BaseTools/Source/Python/UPT/ReplacePkg.py | 8 +- BaseTools/Source/Python/UPT/TestInstall.py | 8 +- BaseTools/Source/Python/UPT/UPT.py | 16 ++-- 8 files changed, 145 insertions(+), 102 deletions(-) diff --git a/BaseTools/Source/Python/UPT/Core/DependencyRules.py b/BaseTool= s/Source/Python/UPT/Core/DependencyRules.py index 57f7b40..909c584 100644 --- a/BaseTools/Source/Python/UPT/Core/DependencyRules.py +++ b/BaseTools/Source/Python/UPT/Core/DependencyRules.py @@ -44,12 +44,24 @@ DEPEX_CHECK_PACKAGE_NOT_FOUND, DEPEX_CHECK_DP_NOT_FOUND= ) =3D (0, 1, 2, 3) # @param object: Inherited from object class # class DependencyRules(object): - def __init__(self, Datab): + def __init__(self, Datab, ToBeInstalledPkgList=3DNone): self.IpiDb =3D Datab self.WsPkgList =3D GetWorkspacePackage() self.WsModuleList =3D GetWorkspaceModule() - self.PkgsToBeDepend =3D [] + + self.PkgsToBeDepend =3D [(PkgInfo[1], PkgInfo[2]) for PkgInfo in s= elf.WsPkgList] + + # Add package info from the DIST to be installed. + self.PkgsToBeDepend.extend(self.GenToBeInstalledPkgList(ToBeInstal= ledPkgList)) =20 + def GenToBeInstalledPkgList(self, ToBeInstalledPkgList): + RtnList =3D [] + for Dist in ToBeInstalledPkgList: + for Package in Dist.PackageSurfaceArea: + RtnList.append((Package[0], Package[1])) + + return RtnList + ## Check whether a module exists by checking the Guid+Version+Name+Pat= h combination # # @param Guid: Guid of a module @@ -182,7 +194,6 @@ class DependencyRules(object): # False else # def CheckInstallDpDepexSatisfied(self, DpObj): - self.PkgsToBeDepend =3D [(PkgInfo[1], PkgInfo[2]) for PkgInfo in s= elf.WsPkgList] return self.CheckDpDepexSatisfied(DpObj) =20 # # Check whether multiple DP depex satisfied by current workspace for= Install @@ -192,7 +203,6 @@ class DependencyRules(object): # False else # def CheckTestInstallPdDepexSatisfied(self, DpObjList): - self.PkgsToBeDepend =3D [(PkgInfo[1], PkgInfo[2]) for PkgInfo in s= elf.WsPkgList] for DpObj in DpObjList: if self.CheckDpDepexSatisfied(DpObj): for PkgKey in DpObj.PackageSurfaceArea.keys(): diff --git a/BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py b/B= aseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py index 3c6c9ee..ae8dc85 100644 --- a/BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py +++ b/BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py @@ -79,6 +79,10 @@ def AddExternToDefineSec(SectionDict, Arch, ExternList): # Using TokenSpaceGuidValue and Token to obtain PcdName from DEC file # def ObtainPcdName(Packages, TokenSpaceGuidValue, Token): + TokenSpaceGuidName =3D '' + PcdCName =3D '' + TokenSpaceGuidNameFound =3D False + for PackageDependency in Packages: # # Generate generic comment @@ -86,6 +90,7 @@ def ObtainPcdName(Packages, TokenSpaceGuidValue, Token): Guid =3D PackageDependency.GetGuid() Version =3D PackageDependency.GetVersion() =20 + Path =3D None # # find package path/name #=20 @@ -95,41 +100,58 @@ def ObtainPcdName(Packages, TokenSpaceGuidValue, Token= ): Path =3D PkgInfo[3] break =20 - DecFile =3D None - if Path not in GlobalData.gPackageDict: - DecFile =3D Dec(Path) - GlobalData.gPackageDict[Path] =3D DecFile - else: - DecFile =3D GlobalData.gPackageDict[Path] - - DecGuidsDict =3D DecFile.GetGuidSectionObject().ValueDict - DecPcdsDict =3D DecFile.GetPcdSectionObject().ValueDict - - TokenSpaceGuidName =3D '' - PcdCName =3D '' - TokenSpaceGuidNameFound =3D False - - # - # Get TokenSpaceGuidCName from Guids section=20 - # - for GuidKey in DecGuidsDict: - GuidList =3D DecGuidsDict[GuidKey] - for GuidItem in GuidList: - if TokenSpaceGuidValue.upper() =3D=3D GuidItem.GuidString.= upper(): - TokenSpaceGuidName =3D GuidItem.GuidCName - TokenSpaceGuidNameFound =3D True + # The dependency package in workspace + if Path: + DecFile =3D None + if Path not in GlobalData.gPackageDict: + DecFile =3D Dec(Path) + GlobalData.gPackageDict[Path] =3D DecFile + else: + DecFile =3D GlobalData.gPackageDict[Path] + + DecGuidsDict =3D DecFile.GetGuidSectionObject().ValueDict + DecPcdsDict =3D DecFile.GetPcdSectionObject().ValueDict + + TokenSpaceGuidName =3D '' + PcdCName =3D '' + TokenSpaceGuidNameFound =3D False + + # + # Get TokenSpaceGuidCName from Guids section + # + for GuidKey in DecGuidsDict: + GuidList =3D DecGuidsDict[GuidKey] + for GuidItem in GuidList: + if TokenSpaceGuidValue.upper() =3D=3D GuidItem.GuidStr= ing.upper(): + TokenSpaceGuidName =3D GuidItem.GuidCName + TokenSpaceGuidNameFound =3D True + break + if TokenSpaceGuidNameFound: break - if TokenSpaceGuidNameFound: - break - # - # Retrieve PcdCName from Pcds Section - # - for PcdKey in DecPcdsDict: - PcdList =3D DecPcdsDict[PcdKey] - for PcdItem in PcdList: - if TokenSpaceGuidName =3D=3D PcdItem.TokenSpaceGuidCName a= nd Token =3D=3D PcdItem.TokenValue: - PcdCName =3D PcdItem.TokenCName - return TokenSpaceGuidName, PcdCName + # + # Retrieve PcdCName from Pcds Section + # + for PcdKey in DecPcdsDict: + PcdList =3D DecPcdsDict[PcdKey] + for PcdItem in PcdList: + if TokenSpaceGuidName =3D=3D PcdItem.TokenSpaceGuidCNa= me and Token =3D=3D PcdItem.TokenValue: + PcdCName =3D PcdItem.TokenCName + return TokenSpaceGuidName, PcdCName + + # The dependency package in ToBeInstalledDist + else: + for Dist in GlobalData.gTO_BE_INSTALLED_DIST_LIST: + for Package in Dist.PackageSurfaceArea.values(): + if Guid =3D=3D Package.Guid: + for GuidItem in Package.GuidList: + if TokenSpaceGuidValue.upper() =3D=3D GuidItem= .Guid.upper(): + TokenSpaceGuidName =3D GuidItem.CName + TokenSpaceGuidNameFound =3D True + break + for PcdItem in Package.PcdList: + if TokenSpaceGuidName =3D=3D PcdItem.TokenSpac= eGuidCName and Token =3D=3D PcdItem.Token: + PcdCName =3D PcdItem.CName + return TokenSpaceGuidName, PcdCName =20 return TokenSpaceGuidName, PcdCName =20 diff --git a/BaseTools/Source/Python/UPT/InstallPkg.py b/BaseTools/Source/P= ython/UPT/InstallPkg.py index 0e99d2f..a8d0e1e 100644 --- a/BaseTools/Source/Python/UPT/InstallPkg.py +++ b/BaseTools/Source/Python/UPT/InstallPkg.py @@ -1,7 +1,7 @@ ## @file # Install distribution package. # -# Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.
# # This program and the accompanying materials are licensed and made availa= ble=20 # under the terms and conditions of the BSD License which accompanies this=20 @@ -133,16 +133,16 @@ def InstallNewFile(WorkspaceDir, File): # # UnZipDp # -def UnZipDp(WorkspaceDir, DpPkgFileName): +def UnZipDp(WorkspaceDir, DpPkgFileName, Index=3D1): ContentZipFile =3D None Logger.Quiet(ST.MSG_UZIP_PARSE_XML) DistFile =3D PackageFile(DpPkgFileName) =20 DpDescFileName, ContentFileName =3D GetDPFile(DistFile.GetZipFile()) =20 - GlobalData.gUNPACK_DIR =3D os.path.normpath(os.path.join(WorkspaceDir,= ".tmp")) - DistPkgFile =3D DistFile.UnpackFile(DpDescFileName, - os.path.normpath(os.path.join(GlobalData.gUNPACK_DIR, DpDescFileNa= me))) + TempDir =3D os.path.normpath(os.path.join(WorkspaceDir, "Conf/.tmp%s" = % str(Index))) + GlobalData.gUNPACK_DIR.append(TempDir) + DistPkgFile =3D DistFile.UnpackFile(DpDescFileName, os.path.normpath(o= s.path.join(TempDir, DpDescFileName))) if not DistPkgFile: Logger.Error("InstallPkg", FILE_NOT_FOUND, ST.ERR_FILE_BROKEN %DpD= escFileName) =20 @@ -159,23 +159,15 @@ def UnZipDp(WorkspaceDir, DpPkgFileName): # # unzip contents.zip file # - ContentFile =3D DistFile.UnpackFile(ContentFileName, - os.path.normpath(os.path.join(GlobalData.gUNPACK_DIR, ContentFileN= ame))) + ContentFile =3D DistFile.UnpackFile(ContentFileName, os.path.normpath(= os.path.join(TempDir, ContentFileName))) if not ContentFile: Logger.Error("InstallPkg", FILE_NOT_FOUND, ST.ERR_FILE_BROKEN % ContentFileName) =20 - FilePointer =3D __FileHookOpen__(ContentFile, "rb") - # - # Assume no archive comment. - # - FilePointer.seek(0, SEEK_SET) - FilePointer.seek(0, SEEK_END) # # Get file size # =20 - FileSize =3D FilePointer.tell() - FilePointer.close() + FileSize =3D os.path.getsize(ContentFile) =20 if FileSize !=3D 0: =20 ContentZipFile =3D PackageFile(ContentFile) @@ -202,8 +194,8 @@ def GetPackageList(DistPkg, Dep, WorkspaceDir, Options,= ContentZipFile, ModuleLi PackagePath =3D Path Package =3D DistPkg.PackageSurfaceArea[Guid, Version, Path] Logger.Info(ST.MSG_INSTALL_PACKAGE % Package.GetName()) - if Dep.CheckPackageExists(Guid, Version): - Logger.Info(ST.WRN_PACKAGE_EXISTED %(Guid, Version)) +# if Dep.CheckPackageExists(Guid, Version): +# Logger.Info(ST.WRN_PACKAGE_EXISTED %(Guid, Version)) if Options.UseGuidedPkgPath: GuidedPkgPath =3D "%s_%s_%s" % (Package.GetName(), Guid, Versi= on) NewPackagePath =3D InstallNewPackage(WorkspaceDir, GuidedPkgPa= th, Options.CustomPath) @@ -509,29 +501,40 @@ def GenToolMisc(DistPkg, WorkspaceDir, ContentZipFile= ): # @param Options: command Options # def Main(Options =3D None): - ContentZipFile, DistFile =3D None, None - try: DataBase =3D GlobalData.gDB WorkspaceDir =3D GlobalData.gWORKSPACE if not Options.PackageFile: Logger.Error("InstallPkg", OPTION_MISSING, ExtraData=3DST.ERR_= SPECIFY_PACKAGE) =20 - # - # unzip dist.pkg file - # - DistPkg, ContentZipFile, DpPkgFileName, DistFile =3D UnZipDp(Works= paceDir, Options.PackageFile) + # Get all Dist Info + DistInfoList =3D [] + DistPkgList =3D [] + Index =3D 1 + for ToBeInstalledDist in Options.PackageFile: + # + # unzip dist.pkg file + # + DistInfoList.append(UnZipDp(WorkspaceDir, ToBeInstalledDist, I= ndex)) + DistPkgList.append(DistInfoList[-1][0]) + Index +=3D 1 =20 - # - # check dependency - # - Dep =3D DependencyRules(DataBase) - CheckInstallDpx(Dep, DistPkg) + # + # Add dist + # + GlobalData.gTO_BE_INSTALLED_DIST_LIST.append(DistInfoList[-1][= 0]) =20 - # - # Install distribution - # - InstallDp(DistPkg, DpPkgFileName, ContentZipFile, Options, Dep, Wo= rkspaceDir, DataBase) + # Check for dependency + Dep =3D DependencyRules(DataBase, DistPkgList) + + for ToBeInstalledDist in DistInfoList: + CheckInstallDpx(Dep, ToBeInstalledDist[0], ToBeInstalledDist[2= ]) + + # + # Install distribution + # + InstallDp(ToBeInstalledDist[0], ToBeInstalledDist[2], ToBeInst= alledDist[1], + Options, Dep, WorkspaceDir, DataBase) ReturnCode =3D 0 =20 except FatalError, XExcept: @@ -556,16 +559,16 @@ def Main(Options =3D None): Logger.Quiet(ST.MSG_PYTHON_ON % (python_version(), platform) + format_exc()) finally: - if ReturnCode !=3D UPT_ALREADY_INSTALLED_ERROR: - Logger.Quiet(ST.MSG_REMOVE_TEMP_FILE_STARTED) - if DistFile: - DistFile.Close() - if ContentZipFile: - ContentZipFile.Close() - if GlobalData.gUNPACK_DIR: - rmtree(GlobalData.gUNPACK_DIR) - GlobalData.gUNPACK_DIR =3D None - Logger.Quiet(ST.MSG_REMOVE_TEMP_FILE_DONE) + Logger.Quiet(ST.MSG_REMOVE_TEMP_FILE_STARTED) + for ToBeInstalledDist in DistInfoList: + if ToBeInstalledDist[3]: + ToBeInstalledDist[3].Close() + if ToBeInstalledDist[1]: + ToBeInstalledDist[1].Close() + for TempDir in GlobalData.gUNPACK_DIR: + rmtree(TempDir) + GlobalData.gUNPACK_DIR =3D [] + Logger.Quiet(ST.MSG_REMOVE_TEMP_FILE_DONE) if ReturnCode =3D=3D 0: Logger.Quiet(ST.MSG_FINISH) return ReturnCode @@ -609,14 +612,15 @@ def BackupDist(DpPkgFileName, Guid, Version, Workspac= eDir): # @param Dep: the DependencyRules instance that used to check dependency # @param DistPkg: the distribution object # -def CheckInstallDpx(Dep, DistPkg): +def CheckInstallDpx(Dep, DistPkg, DistPkgFileName): # # Check distribution package installed or not # if Dep.CheckDpExists(DistPkg.Header.GetGuid(), DistPkg.Header.GetVersion()): - Logger.Error("InstallPkg", UPT_ALREADY_INSTALLED_ERROR, - ST.WRN_DIST_PKG_INSTALLED) + Logger.Error("InstallPkg", + UPT_ALREADY_INSTALLED_ERROR, + ST.WRN_DIST_PKG_INSTALLED % os.path.basename(DistPkgF= ileName)) # # Check distribution dependency (all module dependency should be # satisfied) diff --git a/BaseTools/Source/Python/UPT/Library/GlobalData.py b/BaseTools/= Source/Python/UPT/Library/GlobalData.py index 8f446d4..1ae2417 100644 --- a/BaseTools/Source/Python/UPT/Library/GlobalData.py +++ b/BaseTools/Source/Python/UPT/Library/GlobalData.py @@ -1,7 +1,7 @@ ## @file # This file is used to define common static strings and global data used b= y UPT # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.
# # This program and the accompanying materials are licensed and made availa= ble=20 # under the terms and conditions of the BSD License which accompanies this=20 @@ -87,7 +87,7 @@ gWARNING_AS_ERROR =3D False # # Used to specify the temp directory to hold the unpacked distribution fil= es # -gUNPACK_DIR =3D None +gUNPACK_DIR =3D [] =20 # # Flag used to mark whether the INF file is Binary INF or not. @@ -109,3 +109,8 @@ gPackageDict =3D {} # {FilePath: FileObj} # gLIBINSTANCEDICT =3D {} + +# +# Store the list of DIST +# +gTO_BE_INSTALLED_DIST_LIST =3D [] diff --git a/BaseTools/Source/Python/UPT/Logger/StringTable.py b/BaseTools/= Source/Python/UPT/Logger/StringTable.py index 4c42661..83ae0ae 100644 --- a/BaseTools/Source/Python/UPT/Logger/StringTable.py +++ b/BaseTools/Source/Python/UPT/Logger/StringTable.py @@ -1,7 +1,7 @@ ## @file # This file is used to define strings used in the UPT tool # -# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.
# # This program and the accompanying materials are licensed and made availa= ble=20 # under the terms and conditions of the BSD License which accompanies this=20 @@ -785,7 +785,7 @@ WRN_MODULE_EXISTED =3D _("This module already ex= ists: %s") WRN_FILE_EXISTED =3D _("This file already exists: %s") WRN_FILE_NOT_OVERWRITTEN =3D \ _("This file already exist and cannot be overwritten: %s") -WRN_DIST_PKG_INSTALLED =3D _("This distribution package has previously bee= n installed.") +WRN_DIST_PKG_INSTALLED =3D _("This distribution package %s has previously = been installed.") WRN_DIST_NOT_FOUND =3D _( "Distribution is not found at location %s") WRN_MULTI_PCD_RANGES =3D _( diff --git a/BaseTools/Source/Python/UPT/ReplacePkg.py b/BaseTools/Source/P= ython/UPT/ReplacePkg.py index 9f231f9..efbf68a 100644 --- a/BaseTools/Source/Python/UPT/ReplacePkg.py +++ b/BaseTools/Source/Python/UPT/ReplacePkg.py @@ -1,7 +1,7 @@ ## @file # Replace distribution package. # -# Copyright (c) 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
# # This program and the accompanying materials are licensed and made availa= ble=20 # under the terms and conditions of the BSD License which accompanies this=20 @@ -99,9 +99,9 @@ def Main(Options =3D None): DistFile.Close() if ContentZipFile: ContentZipFile.Close() - if GlobalData.gUNPACK_DIR: - rmtree(GlobalData.gUNPACK_DIR) - GlobalData.gUNPACK_DIR =3D None + for TempDir in GlobalData.gUNPACK_DIR: + rmtree(TempDir) + GlobalData.gUNPACK_DIR =3D [] Logger.Quiet(ST.MSG_REMOVE_TEMP_FILE_DONE) =20 =20 if ReturnCode =3D=3D 0: diff --git a/BaseTools/Source/Python/UPT/TestInstall.py b/BaseTools/Source/= Python/UPT/TestInstall.py index dae4415..899cae5 100644 --- a/BaseTools/Source/Python/UPT/TestInstall.py +++ b/BaseTools/Source/Python/UPT/TestInstall.py @@ -1,7 +1,7 @@ # # @file # Test Install distribution package # -# Copyright (c) 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.
# # This program and the accompanying materials are licensed and made availa= ble # under the terms and conditions of the BSD License which accompanies this @@ -90,9 +90,9 @@ def Main(Options=3DNone): DistFile.Close() if ContentZipFile: ContentZipFile.Close() - if GlobalData.gUNPACK_DIR: - shutil.rmtree(GlobalData.gUNPACK_DIR) - GlobalData.gUNPACK_DIR =3D None + for TempDir in GlobalData.gUNPACK_DIR: + shutil.rmtree(TempDir) + GlobalData.gUNPACK_DIR =3D [] Logger.Quiet(ST.MSG_REMOVE_TEMP_FILE_DONE) if ReturnCode =3D=3D 0: Logger.Quiet(ST.MSG_FINISH) diff --git a/BaseTools/Source/Python/UPT/UPT.py b/BaseTools/Source/Python/U= PT/UPT.py index d98b469..325b96b 100644 --- a/BaseTools/Source/Python/UPT/UPT.py +++ b/BaseTools/Source/Python/UPT/UPT.py @@ -120,7 +120,7 @@ def Main(): =20 Parser.add_option("-q", "--quiet", action=3D"store_true", dest=3D"opt_= quiet", help=3DST.HLP_RETURN_AND_DISPLAY) =20 - Parser.add_option("-i", "--install", action=3D"store", type=3D"string"= , dest=3D"Install_Distribution_Package_File", + Parser.add_option("-i", "--install", action=3D"append", type=3D"string= ", dest=3D"Install_Distribution_Package_File", help=3DST.HLP_SPECIFY_PACKAGE_NAME_INSTALL) =20 Parser.add_option("-c", "--create", action=3D"store", type=3D"string",= dest=3D"Create_Distribution_Package_File", @@ -228,12 +228,14 @@ def Main(): RunModule =3D MkPkg.Main =20 elif Opt.PackFileToInstall: - if not Opt.PackFileToInstall.endswith('.dist'): - Logger.Error("InstallPkg", FILE_TYPE_MISMATCH, ExtraData= =3DST.ERR_DIST_EXT_ERROR % Opt.PackFileToInstall) - - AbsPath =3D GetFullPathDist(Opt.PackFileToInstall, WorkspaceDi= r) - if not AbsPath: - Logger.Error("InstallPkg", FILE_NOT_FOUND, ST.ERR_INSTALL_= DIST_NOT_FOUND % Opt.PackFileToInstall) + AbsPath =3D [] + for Item in Opt.PackFileToInstall: + if not Item.endswith('.dist'): + Logger.Error("InstallPkg", FILE_TYPE_MISMATCH, ExtraDa= ta=3DST.ERR_DIST_EXT_ERROR % Item) + + AbsPath.append(GetFullPathDist(Item, WorkspaceDir)) + if not AbsPath: + Logger.Error("InstallPkg", FILE_NOT_FOUND, ST.ERR_INST= ALL_DIST_NOT_FOUND % Item) =20 Opt.PackFileToInstall =3D AbsPath setattr(Opt, 'PackageFile', Opt.PackFileToInstall) --=20 2.7.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel