def _fulfills_version_spec(versions, oper, desired_version, ignore_epoch=False):
 cmp_func = __salt__.get('pkg.version_cmp')
 if salt.utils.is_freebsd():
  if (isinstance(versions, dict) and ('version' in versions)):
   versions = versions['version']
 for ver in versions:
  if salt.utils.compare_versions(ver1=ver, oper=oper, ver2=desired_version, cmp_func=cmp_func, ignore_epoch=ignore_epoch):
   return True
 return False

def _fulfills_version_spec ( versions , oper , desired_version , ignore_epoch = False ) : cmp_func = __salt__ . get ( 'pkg.version_cmp' ) if salt . utils . is_freebsd ( ) : if ( isinstance ( versions , dict ) and ( 'version' in versions ) ) : versions = versions [ 'version' ] for ver in versions : if salt . utils . compare_versions ( ver1 = ver , oper = oper , ver2 = desired_version , cmp_func = cmp_func , ignore_epoch = ignore_epoch ) : return True return False
returns true if any of the installed versions match the specified version .