def __RecursiveEnableExtension(currentNode: Union[RequirementTreeNode, AppInfoGlobalRequirementTreeNode], extensionName: str, log: Optional[Log], strIndent: str) -> bool: found = False if currentNode.Content is not None and currentNode.Content.Type == PackageRequirementTypeString.Extension and currentNode.Content.Name == extensionName: currentNode.Supported = True found = True if log is not None: log.LogPrint("{0}{1}".format(strIndent, QualifiedRequirementExtensionName.ToString(currentNode.Content.Extends, currentNode.Content.Name))) for child in currentNode.Children: if __RecursiveEnableExtension(child, extensionName, log, strIndent): found = True return found
def __GetCompleteMissingExtensionNames( package: Union[Package, AppInfoPackage], requirementTree: Union[RequirementTree, AppInfoGlobalRequirementTree] ) -> List[str]: missing = [] for requirement in package.ResolvedAllRequirements: if requirement.Type == PackageRequirementTypeString.Extension and not PackageFilter.__IsExtensionAvailable( requirementTree, requirement.Extends, requirement.Name): missing.append( QualifiedRequirementExtensionName.ToString( requirement.Extends, requirement.Name)) return missing