def update_package_db(module, xbps_path):
 cmd = ('%s -S' % xbps_path['install'])
 (rc, stdout, stderr) = module.run_command(cmd, check_rc=False)
 if (rc != 0):
  module.fail_json(msg='Could not update package db')
 if ('avg rate' in stdout):
  return True
 else:
  return False

def update_package_db ( module , xbps_path ) : cmd = ( '%s -S' % xbps_path [ 'install' ] ) ( rc , stdout , stderr ) = module . run_command ( cmd , check_rc = False ) if ( rc != 0 ) : module . fail_json ( msg = 'Could not update package db' ) if ( 'avg rate' in stdout ) : return True else : return False
updates packages list .