# @param object: Inherited from object class\r
#\r
class DependencyRules(object):\r
- def __init__(self, Datab):\r
+ def __init__(self, Datab, ToBeInstalledPkgList=None):\r
self.IpiDb = Datab\r
self.WsPkgList = GetWorkspacePackage()\r
self.WsModuleList = GetWorkspaceModule()\r
- self.PkgsToBeDepend = []\r
+\r
+ self.PkgsToBeDepend = [(PkgInfo[1], PkgInfo[2]) for PkgInfo in self.WsPkgList]\r
+\r
+ # Add package info from the DIST to be installed.\r
+ self.PkgsToBeDepend.extend(self.GenToBeInstalledPkgList(ToBeInstalledPkgList))\r
\r
+ def GenToBeInstalledPkgList(self, ToBeInstalledPkgList):\r
+ RtnList = []\r
+ for Dist in ToBeInstalledPkgList:\r
+ for Package in Dist.PackageSurfaceArea:\r
+ RtnList.append((Package[0], Package[1]))\r
+\r
+ return RtnList\r
+\r
## Check whether a module exists by checking the Guid+Version+Name+Path combination\r
#\r
# @param Guid: Guid of a module\r
# False else\r
#\r
def CheckInstallDpDepexSatisfied(self, DpObj):\r
- self.PkgsToBeDepend = [(PkgInfo[1], PkgInfo[2]) for PkgInfo in self.WsPkgList]\r
return self.CheckDpDepexSatisfied(DpObj)\r
\r
# # Check whether multiple DP depex satisfied by current workspace for Install\r
# False else\r
#\r
def CheckTestInstallPdDepexSatisfied(self, DpObjList):\r
- self.PkgsToBeDepend = [(PkgInfo[1], PkgInfo[2]) for PkgInfo in self.WsPkgList]\r
for DpObj in DpObjList:\r
if self.CheckDpDepexSatisfied(DpObj):\r
for PkgKey in DpObj.PackageSurfaceArea.keys():\r