@decorators.memoize
def _get_version():
 xpath = _check_xbps()
 version_string = __salt__['cmd.run']('{0} --version'.format(xpath), output_loglevel='trace')
 if (version_string is None):
  return False
 VERSION_MATCH = re.compile('(?:XBPS:[\\s]+)([\\d.]+)(?:[\\s]+.*)')
 version_match = VERSION_MATCH.search(version_string)
 if (not version_match):
  return False
 return version_match.group(1).split('.')

@ decorators . memoize def _get_version ( ) : xpath = _check_xbps ( ) version_string = __salt__ [ 'cmd.run' ] ( '{0} --version' . format ( xpath ) , output_loglevel = 'trace' ) if ( version_string is None ) : return False VERSION_MATCH = re . compile ( '(?:XBPS:[\\s]+)([\\d.]+)(?:[\\s]+.*)' ) version_match = VERSION_MATCH . search ( version_string ) if ( not version_match ) : return False return version_match . group ( 1 ) . split ( '.' )
get the pkgin version .