Exemple #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
 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
Exemple #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)
Exemple #4
0
 def matches(self, relation, version):
     if not relation:
         return True
     return checkdep(self.version, relation, version)
Exemple #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)
Exemple #6
0
 def matches(self, relation, version):
     if not relation:
         return True
     return checkdep(self.version, relation, version)