diff options
author | Hess Chen <hesheng.chen@intel.com> | 2016-07-29 15:58:23 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2016-08-03 10:47:52 +0800 |
commit | 6cf9903481f07859cb0013598d2d13309d4e4644 (patch) | |
tree | aed86525be0cd991073e28889eca83c15185ae10 /BaseTools/Source/Python/UPT/Core | |
parent | 17f3e942bc527fbd75068d2d5752b6af54917487 (diff) | |
download | edk2-platforms-6cf9903481f07859cb0013598d2d13309d4e4644.tar.xz |
BaseTool/UPT: Add Test Install
Add a new function to test if a DIST file list
one by one to see if they can meet the requirement
of Dependency.
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/Core')
-rw-r--r-- | BaseTools/Source/Python/UPT/Core/DependencyRules.py | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/UPT/Core/DependencyRules.py b/BaseTools/Source/Python/UPT/Core/DependencyRules.py index 4608ed6030..7039a7d626 100644 --- a/BaseTools/Source/Python/UPT/Core/DependencyRules.py +++ b/BaseTools/Source/Python/UPT/Core/DependencyRules.py @@ -1,7 +1,7 @@ ## @file
# This file is for installed package information database operations
#
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials are licensed and made available
# under the terms and conditions of the BSD License which accompanies this
@@ -184,6 +184,25 @@ class DependencyRules(object): self.PkgsToBeDepend = [(PkgInfo[1], PkgInfo[2]) for PkgInfo in self.WsPkgList]
return self.CheckDpDepexSatisfied(DpObj)
+ # # Check whether multiple DP depex satisfied by current workspace for Install
+ #
+ # @param DpObjList: A distribution object list
+ # @return: True if distribution depex satisfied
+ # False else
+ #
+ def CheckTestInstallPdDepexSatisfied(self, DpObjList):
+ self.PkgsToBeDepend = [(PkgInfo[1], PkgInfo[2]) for PkgInfo in self.WsPkgList]
+ for DpObj in DpObjList:
+ if self.CheckDpDepexSatisfied(DpObj):
+ for PkgKey in DpObj.PackageSurfaceArea.keys():
+ PkgObj = DpObj.PackageSurfaceArea[PkgKey]
+ self.PkgsToBeDepend.append((PkgObj.Guid, PkgObj.Version))
+ else:
+ return False, DpObj
+
+ return True, DpObj
+
+
## Check whether a DP depex satisfied by current workspace
# (excluding the original distribution's packages to be replaced) for Replace
#
|