code: def _get_version():
      '''
      Get the xbps version
      '''
      version_string = __salt__['cmd.run'](
          [_check_xbps(), '--version'],
          output_loglevel='trace')
      if version_string is None:
          # Dunno why it would, but...
          return False
  
      VERSION_MATCH = re.compile(r'(?:XBPS:[\s]+)([\d.]+)(?:[\s]+.*)')
      version_match = VERSION_MATCH.search(version_string)
      if not version_match:
          return False
  
      return version_match.group(1).split('.'f _get_version():
      '''
      Get the xbps version
      '''
      version_string = __salt__['cmd.run'](
          [_check_xbps(), '--version'],
          output_loglevel='trace')
      if version_string is None:
          # Dunno why it would, but...
          return False
  
      VERSION_MATCH = re.compile(r'(?:XBPS:[\s]+)([\d.]+)(?:[\s]+.*)')
      version_match = VERSION_MATCH.search(version_string)
      if not version_match:
          return False
  
      return version_match.group(1).split('.')
docs: Get the xbps version