Example #1
0
    def getDependencies(self,
                        depList=[],
                        depType=DependencyType.Both,
                        single=set(),
                        maxDepth=-1,
                        depth=0,
                        ignoredPackages=None):
        """ returns all dependencies """
        if depType == DependencyType.Runtime:
            children = self.runtimeChildren
        elif depType == DependencyType.Buildtime:
            children = self.buildChildren
        else:
            children = self.runtimeChildren + self.buildChildren

        single.add(self)
        for p in children:
            if not p in single and not p in depList\
                    and not PortageInstance.ignores.match(p.fullName())\
                    and not p.fullName() in (ignoredPackages or []):
                if maxDepth == -1:
                    p.getDependencies(depList, depType, single)
                elif depth < maxDepth:
                    p.getDependencies(depList,
                                      depType,
                                      single,
                                      maxDepth=maxDepth,
                                      depth=depth + 1)

        #if self.category != internalCategory:
        if not self in depList and not PortageInstance.ignores.match(
                PackageObjectBase.__str__(self)):
            depList.append(self)

        return depList
Example #2
0
    def getDependencies( self, depList = [], dep_type="both", single = set(), maxDetpth = -1, depth = 0):
        """ returns all dependencies """
        if dep_type == "runtime":
            children = self.runtimeChildren
        elif dep_type == "buildtime":
            children = self.buildChildren
        else:
            children = self.runtimeChildren + self.buildChildren

        single.add(self)
        for p in children:
            if not p in single and not p in depList\
            and not p.fullName() in PortageInstance.ignores:
                if maxDetpth == -1:
                    p.getDependencies( depList, dep_type, single )
                elif depth < maxDetpth:
                    p.getDependencies( depList, dep_type, single, maxDetpth = maxDetpth, depth = depth + 1 )
                    
        #if self.category != internalCategory:
        if not self in depList and not PackageObjectBase.__str__(self) in PortageInstance.ignores:
            depList.append( self )

        return depList
Example #3
0
    def getDependencies( self, depList = [], depType=DependencyType.Both, single = set(), maxDepth = -1, depth = 0, ignoredPackages = None):
        """ returns all dependencies """
        if depType == DependencyType.Runtime:
            children = self.runtimeChildren
        elif depType == DependencyType.Buildtime:
            children = self.buildChildren
        else:
            children = self.runtimeChildren + self.buildChildren

        single.add(self)
        for p in children:
            if not p in single and not p in depList\
                    and not PortageInstance.ignores.match(p.fullName())\
                    and not p.fullName() in (ignoredPackages or []):
                if maxDepth == -1:
                    p.getDependencies( depList, depType, single )
                elif depth < maxDepth:
                    p.getDependencies( depList, depType, single, maxDepth = maxDepth, depth = depth + 1 )
                    
        #if self.category != internalCategory:
        if not self in depList and not PortageInstance.ignores.match(PackageObjectBase.__str__(self)):
            depList.append( self )

        return depList
Example #4
0
 def __str__(self):
     return "%s: %s" % (PackageObjectBase.__str__(self), self.version)
Example #5
0
 def __str__(self):
     return "%s failed: %s" % (PackageObjectBase.__str__(self),
                               Exception.__str__(self))
Example #6
0
 def __str__(self):
     return "%s: %s" % (PackageObjectBase.__str__(self), self.version)
Example #7
0
 def __str__(self):
     return "%s failed: %s" % (PackageObjectBase.__str__(self),Exception.__str__(self))