Ejemplo n.º 1
0
 def matches(self, prv):
     if not isinstance(prv, SlackProvides) and type(prv) is not Provides:
         return False
     for name, relation, version in self._nrv:
         if name == prv.name:
             if not version:
                 return True
             if not prv.version:
                 continue
             if checkdep(prv.version, relation, version):
                 return True
     return False
Ejemplo n.º 2
0
 def matches(self, prv):
     if not isinstance(prv, SlackProvides) and type(prv) is not Provides:
         return False
     for name, relation, version in self._nrv:
         if name == prv.name:
             if not version:
                 return True
             if not prv.version:
                 continue
             if checkdep(prv.version, relation, version):
                 return True
     return False
Ejemplo n.º 3
0
 def matches(self, prv):
     if not isinstance(prv, SlackProvides) and type(prv) is not Provides:
         return False
     if not self.version or not prv.version:
         return True
     return checkdep(prv.version, self.relation, self.version)
Ejemplo n.º 4
0
 def matches(self, relation, version):
     if not relation:
         return True
     return checkdep(self.version, relation, version)
Ejemplo n.º 5
0
 def matches(self, prv):
     if not isinstance(prv, SlackProvides) and type(prv) is not Provides:
         return False
     if not self.version or not prv.version:
         return True
     return checkdep(prv.version, self.relation, self.version)
Ejemplo n.º 6
0
 def matches(self, relation, version):
     if not relation:
         return True
     return checkdep(self.version, relation, version)