diff options
author | Hess Chen <hesheng.chen@intel.com> | 2017-08-10 16:36:47 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2017-08-12 12:38:26 +0800 |
commit | 566368148c014702f98d6c37a3934b1c1e60dfd4 (patch) | |
tree | a2ec0a254f68cc78c6b51f8299cb0353c5636a3d /BaseTools/Source/Python/UPT/UPT.py | |
parent | ef190542b4dbc4577ef7d1f99209199f0c1b6e66 (diff) | |
download | edk2-566368148c014702f98d6c37a3934b1c1e60dfd4.tar.gz edk2-566368148c014702f98d6c37a3934b1c1e60dfd4.tar.bz2 edk2-566368148c014702f98d6c37a3934b1c1e60dfd4.zip |
BaseTools/UPT: Support Multiple Installation
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: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/UPT/UPT.py')
-rw-r--r-- | BaseTools/Source/Python/UPT/UPT.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/BaseTools/Source/Python/UPT/UPT.py b/BaseTools/Source/Python/UPT/UPT.py index d98b469640..325b96bf56 100644 --- a/BaseTools/Source/Python/UPT/UPT.py +++ b/BaseTools/Source/Python/UPT/UPT.py @@ -120,7 +120,7 @@ def Main(): Parser.add_option("-q", "--quiet", action="store_true", dest="opt_quiet", help=ST.HLP_RETURN_AND_DISPLAY)
- Parser.add_option("-i", "--install", action="store", type="string", dest="Install_Distribution_Package_File",
+ Parser.add_option("-i", "--install", action="append", type="string", dest="Install_Distribution_Package_File",
help=ST.HLP_SPECIFY_PACKAGE_NAME_INSTALL)
Parser.add_option("-c", "--create", action="store", type="string", dest="Create_Distribution_Package_File",
@@ -228,12 +228,14 @@ def Main(): RunModule = MkPkg.Main
elif Opt.PackFileToInstall:
- if not Opt.PackFileToInstall.endswith('.dist'):
- Logger.Error("InstallPkg", FILE_TYPE_MISMATCH, ExtraData=ST.ERR_DIST_EXT_ERROR % Opt.PackFileToInstall)
-
- AbsPath = GetFullPathDist(Opt.PackFileToInstall, WorkspaceDir)
- if not AbsPath:
- Logger.Error("InstallPkg", FILE_NOT_FOUND, ST.ERR_INSTALL_DIST_NOT_FOUND % Opt.PackFileToInstall)
+ AbsPath = []
+ for Item in Opt.PackFileToInstall:
+ if not Item.endswith('.dist'):
+ Logger.Error("InstallPkg", FILE_TYPE_MISMATCH, ExtraData=ST.ERR_DIST_EXT_ERROR % Item)
+
+ AbsPath.append(GetFullPathDist(Item, WorkspaceDir))
+ if not AbsPath:
+ Logger.Error("InstallPkg", FILE_NOT_FOUND, ST.ERR_INSTALL_DIST_NOT_FOUND % Item)
Opt.PackFileToInstall = AbsPath
setattr(Opt, 'PackageFile', Opt.PackFileToInstall)
|